How To Create Garmin Topo Maps - Part 9 - Compiling Data

Author: Dan Blomberg | Last updated March 15th, 2016 at 07:35pm


The final part of this lesson is two parts.  The first, and required, step is converting the .mp files to Garmin compatible .img files.  The second, optional, step is creating a NSIS setup file to allow people to easily install your new map.

Creating .img Files

First make sure you have cgpsmapper installed. How these files were created (Global Mapper or QGIS/GPSFDshp2mp) doesn't matter.

  1. Download GPSFileDepot's CompileMps.bat batch script to make processing autonomous
  2. Extract them into the root folder for your map (i.e. mississippitopo)
  3. Right click on ConvertSplit2mp and click edit (should open in Notepad).
  4. Modify the following information as required:
    • Change the finalmpfolder data to the folder where the final mp files are (normally complete folder)
    • If necessary, change cgpsmapperfolder to the folder containing cgpsmapper.exe
  5. Save the bat file and close Notepad
  6. Double click CompileMps and let it run. This will call cgpsmapper for each .mp file and convert it to a proper .img file. This will likely take many hours but you can see the progress in the DOS window.

This process will most likely take a few hours and will create .img files.  You are now done with the .mp files.

Creating The Preview File

I use MapSetToolkit to easily create the preview files.In the lower left make sure you point the cgpsmapper blank to the location where cgpsmapper is installed.

  1. Move all the img and all the img.idx files from the complete folder to the release folder
  2. Open MapSetToolkit
  3. Make sure the cgpsmapper/cpreview folder is filled in correctly
  4. Click "Select IMG" in the upper left
  5. Point it to your release folder
  6. Click "Select All"
  7. Click "Add-->"
  8. Set the Mapset Directory to the release folder
  9. Enter your mapset name into the mapset name box (Mississippi Topo for example)
  10. We're going to fill in family ID with a 4 or 5 digit number. 
    Note: This number can be random but right now GPSFileDepot's maps use 326# and 327#; please don't use any 326# or 327#.
  11. Leave Product Code blank (it'll automatically fill in with 1)
  12. Fill in the map version with whatever version you're on and leave CodePage as 1252
  13. Enter your information into the copyright information box; it may not use this depending on the version of cgpsmapper you use.
  14. Click Start

Creating Setup Files

We will use NSIS and a template file to easily create setup files that install your maps on someone's computer as well as make it easy to access in BaseCamp or MapSource.

  1. Download the setup template file. (Updated 15 March 2016 [critical updates])
  2. Extract the files to your release folder
  3. Optional: Open license.txt and modify as needed/you see fit.
  4. Open the .nsi file in notepad
  6. Edit MAP_SHORT_NAME (this needs to match the map name from Mapset Toolkit)
  7. Edit MAP_URL
  8. Edit MAP_EMAIL
  10. Edit MAP_VERSION
  11. Edit MAP_REL_DATE (map release date)
  12. You will need to convert the decimal family id to hexadecimal using Windows' built in calculator.  This decimal code is the family id from Mapset Toolkit.
    1. Open the calculator built in to Microsoft Windows (normally in the Accessories part of the Start menu)
    2. Click view>scientific (on Windows 10 hit the three lines in the upper left and select Programmer instead of scientific)
    3. Make sure that "Dec" is clicked (circle filled in or blue in windows 10) and then type in your family id.
    4. Now click "Hex"; it will return a number (on Windows 10 it will just display the number next to the word HEX).  If the number is only 3 digits don't forget to add the zero to the front; for example if the decimal number was 2351 the hexadecimal will display as 92F and in this case we need to make it 092F.
  13. Now take this code and "flip" it, if the hex code was ABCD then your MAP_ID is CDAB. The flip involves bring the last 2 character and bringing them to the front. In the example above the family id would be 2F09.
  14. Change the DIRECTORY to match your release directory
  15. Change the EXE_FILE fromStatetopo_install.exe to XXtopo_install.exe where XX is your state's two letter code.
  16. Advanced options (do as required/optional):
    1. If cgpsmapper/MapSetToolkit created a .mdx file uncomment (remove the ; ) line 128.
    2. If cgpsmapper/MapSetToolkit created .img.idx , .tbd, and _mdr.img then uncomment lines 129 and 134
    3. This will allow the installer to work with searchable maps.
    4. If you used custom types uncomment and fill in line 19 and then uncomment line 130
    5. If you want to have a custom icon for your setup file fill in line 23 and then uncomment lines 40 and 41
    6. If you want to use a custom left side graphic (as -Oz-'s installers do) then fill in line 24 and uncomment line 47
  17. Now save the file and close notepad.
  18. Open NSIS and compile the .nsi file.
    NOTE: If you run into an error try moving all the files to a more "root" directory. I use C:\MapTemp and then change line 20 to reflect. Now when you compile it should work.

You should now have a setup exe in your release folder.

Creating Mac Files

This is an optional step but highly recommended.

  1. Download Garmin MapConverter.
  2. Start MapConverter
  3. Click next if it says there are maps that can't be converted.
  4. Select the map you want to convert and uncheck all the others.
  5. Click Next.
  6. Put the file in your release folder
  7. Click next and let it do the conversion.
  8. Have it open the folder for you.
  9. Once you are in the folder we need to zip the file it created. In Windows right click on the .gmapi folder and click Send to > Compressed (zipped) Folder
  10. Now you are ready to upload the zip file.

You now have a file that can be opened and then installed on a Mac computer.

If you want to make it easier (and have a mac) we highly reccomend you create a setup file for Macs for Garmin compatible maps.

What's Next?

Now that you've made a map make sure you register here at GPSFileDepot and then go to the member's area and add your map so you can share it with the world.

If you have any questions of comments please either contact us or post in the forums.

<-- Previous - Combining | Table of Contents