Welcome guest, is this your first visit? Click the "Create Account" button now to join.
Results 31 to 40 of 184

Threaded View

  1. #1
    AlexWhiter
    Guest

    raster Converting JNX to raster IMG

    Hi there,

    I've made a small set of tools allowing for conversion from JNX maps to raster IMG.
    At this point, the "converter" is just a wrapper around the Mapsource Product Creator map compiler, and GmapTool.
    So, the MPC map compiler (bld_gmap32.exe) is required for the conversion, as well as gmt.exe tool from the GmapTool installation.

    [Only registered and activated users can see links. ] is the archive with the scripts and tools.
    After you unpack the archive, there will be Tools folder with two subfolders.
    Please copy the contents of MPC\Tools\bld_gmap32 folder into extracted Tools\bld_gmap32 folder, and also copy you MPC license file into the same folder with License.mpl name.
    Next, copy gmt.exe file from GmapTool\gmt.
    Make sure the script will have permissions to create and delete subfolders in the folder it is extracted to.
    That's it for the initial setup.

    Now, you can start jnx2img.cmd script with two command line parameters - path to JNX file, and path to resulting IMG. Like this:
    Code:
    Please Login or Register to see the links
    There are also optional command line parameters:
    "MapID=<hex or decimal number>", where hex number must be either prefixed with '0x' or '$', or suffixed with 'h' - to manually set MapID, default is a random id.
    "DrawOrder=<decimal number>" - to set map's drawing order (also known as map priority), default is 24.
    "MapSeries=<decimal number>" - to set MapSeries field in the map header (TRE + 0x45), default is 36.
    "DataBounds=<0 or 1>" - if set to 1 (default value), the IMG map will include DataBounds area to make it compatible with Monterra devices. If you are not going to use the map in Monterra, you can set this parameter to 0, in this case the map will compile a bit faster and the IMG file will be slightly smaller.
    "VolumeSize=<decimal number>" - limits the size of the JNX tiles (in bytes) saved into a single IMG, and splits the map into several IMGs is necessary. Use this option to set the approximate size of IMG file, or in case when bld_gmap32 fails because LBL sub-file becomes too large. Default is 2Gb minus 5%.
    "CodePage=<decimal number>" - Set the map code page. 1252 is used by default.
    Spoiler: The following code pages are supported
    874 - Thai,
    932 - Japanese,
    936 - Simplified Chinese,
    949 - Korean,
    950 - Traditional Chinese,
    1250 - Central European,
    1251 - Cyrillic,
    1252 - Western European,
    1253 - Greek,
    1254 - Turkish,
    1255 - Hebrew,
    1256 - Arabic,
    1257 - Baltic


    Please note the quotes around these parameters are required, so the converter can be started like this:
    Code:
    Please Login or Register to see the links
    Known limitations and issues of the current version:
    1. All the JNX levels with the scales below 864 will be mapped into a lowest zoom level in IMG, it becomes visible from 5m to 200m.

    2. If more than one level in your JNX is mapped to the same IMG map zoom, the converter will only use the JNX level with lowest scale value (i.e. the most detailed one).

    3. Starting from version 1.6, the converter emulates the distribution of levels used in JNX maps - i.e. the tiles of some level are visible until the more detailed level becomes visible.

    4. When MapSeries is set to its default value (i.e. 36), or not specified, the converted raster IMG map will hide all area features of other maps in the device (independently of their draworder parameters). POIs and lines can still be visible (this will depend on the draworder of the maps).


    Important addition:
    I've implemented the IMG export in SAS.Planet. The export is available in its [Only registered and activated users can see links. ], and will most likely be included in the next stable release.
    To compile IMG you'll need the same bld_gmap32 and gmt required by jnx2img.
    Last edited by AlexWhiter; 15th January 2018 at 04:15 PM. Reason: Recovering from the great void

  2.    Advertissements


 

 

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •