Welcome guest, is this your first visit? Click the "Create Account" button now to join.
Page 1 of 19 12311 ... LastLast
Results 1 to 10 of 184
  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


  3. #2
    Master
    Join Date
    Feb 2011
    Location
    Sofia
    Age
    38
    Posts
    736
    Rep Power
    222

    Default

    Can this be used for the birds eye JNX?

  4. #3
    AlexWhiter
    Guest

    Default

    Quote Originally Posted by ddabcd277 View Post
    Can this be used for the birds eye JNX?
    Any well-formed JNX file can be converted

  5. #4
    Important User Converting JNX to raster IMG
    Converting JNX to raster IMGConverting JNX to raster IMGConverting JNX to raster IMGConverting JNX to raster IMGConverting JNX to raster IMGConverting JNX to raster IMGConverting JNX to raster IMG
    catymag's Avatar
    Join Date
    Nov 2007
    Location
    light side
    Posts
    15,513
    Rep Power
    5042

    Default

    ..and used even in not patchable firmware that is the most important thing
    l9ebnsm
    You have to navigate to get to the good.

    Galaxy S5 Kitkat 4.4.2 / Nuvi1200->1250 / Nuvi3790T->34xx / Nuvi 2200 / Nuvi 66 / Oregon 600

  6. #5
    AlexWhiter
    Guest

    Default

    Quote Originally Posted by catymag View Post
    ..and used even in not patchable firmware that is the most important thing
    Of course! That's amost the whole point!
    Last edited by AlexWhiter; 14th November 2013 at 03:54 PM. Reason: spelling

  7. #6
    AlexWhiter
    Guest

    Default

    The script is updated. Please redownload from the same location.
    Changes:
    1. Any MPL-license from Tools\bld_gmap32 folder will be used, not necessarily with License.mlp name.
    2. Sometimes, the generated MapIDs were not supported by the devices. Fixed.
    3. MapID can now be set from the command line like this (8-digit hex number is used):
    Code:
    Please Login or Register to see the links
    Update:
    Nasty bug was found: when a multi-level JNX map is converted, the levels in IMG will come "upside down", so the most detailed JNX level becomes visible at less detailed zooms in the GPS.
    Last edited by AlexWhiter; 14th November 2013 at 05:25 PM.

  8. #7
    Navigation software expert Converting JNX to raster IMG
    Converting JNX to raster IMGConverting JNX to raster IMGConverting JNX to raster IMG
    Giomen's Avatar
    Join Date
    Apr 2009
    Location
    Suomi-Russia
    Age
    56
    Posts
    2,155
    Rep Power
    683

    Default

    Best Post of the Month?
    Garmin, how much is 30 pieces of silver for Judas today? Were they worthy for crucifix of GPSPower?

  9. #8
    Master
    Join Date
    Feb 2011
    Location
    Sofia
    Age
    38
    Posts
    736
    Rep Power
    222

    Default

    Honestly I can't understand its very much practical usage but ok. I think a simple script lets say geoTIFF to IMG like the tool GPX to IMG would have more popularity. Or at least I would use it more frequent.

  10. #9
    AlexWhiter
    Guest

    Default

    Quote Originally Posted by Giomen View Post
    Best Post of the Month?
    Please don't overestimate this proof-of-concept project. It's more for a testing, than for a real-life usage.

    In fact, this is just a step for a better understanding of IMG structure (partucularily, of RGN blocks huffman encoding in NT format) - I need a simple, yet reliable tool for making raster IMGs from a set of geo-referenced tiles.
    I'm still planing to make a standalone converter, and then a library, just like JNXLib, which could be used with to export raster IMGs from SASPlanet, GlobalMapper etc.
    I hope I won't get too lazy for finishing this

  11. #10
    AlexWhiter
    Guest

    Default

    Quote Originally Posted by ddabcd277 View Post
    Honestly I can't understand its very much practical usage but ok.
    The main reason for making this tool was to provide an alternative to JNX maps, but without their silly limitations, such as:
    1. device locking and firmware patching as a solution;
    2. inability to disable of any given map, not the whole set of maps.


    Quote Originally Posted by ddabcd277 View Post
    I think a simple script lets say geoTIFF to IMG like the tool GPX to IMG would have more popularity. Or at least I would use it more frequent.
    That simple script would also require GDAL tools, or anything else that can perform map reprojection and tiling from the command line

 

 

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
  •