Make Maps For Garmin Mapping GPS
From GisWiki
Make your own downloadable maps for Garmin Mapping GPS (For New Zealand) with GPSTrackmaker and MapDekode[edit]
Data
- LINZ data (topographic, roads, streets, rivers etc) from NZ Topo Online
[edit]
Software
- GPSTrackMaker from http://www.gpstm.com
- MapDekode from http://www.gpstm.com/eng/dekode_eng.htm
- IMG2GPS from http://homepage.ntlworld.com/mdipol/img2gps
- SendMap from http://gps.chrisb.org/en/download.htm
[edit]
Instructions
Install all the above software on your PC - all of this software is free, though GPSTrackmaker has some licence restrictions - you may not use the software if you are not environmentally minded.
For demonstration purposes we will make a street map of Hamilton city with GPSTrackMaker and MapDekode.
- Go to the LINZ website and locate the NZGD2000 series of online maps: http://www.nztopoonline.linz.govt.nz/website/nzgd2000topo/terms_cond.htm
- Set your monitor size with the on-screen prompts and enter the map
- Select the rough area of Hamilton on the map with the cross hairs - the map will zoom in on the location. Slow over dial-up connections.
- Select the Zoom to user specified scale (the magnifying glass with the S) and select 1:50,000. This is the maximum size for the data extract from the LINZ site.
- The map will zoom to the correct scale. You may have to scroll the map slightly to get a good coverage of the northern half of Hamilton.
- Click on the Custom Extract icon (the disk drive with the red arrow)
- A new window will pop-up - if you are not at a scale of 1:50,000 or better the dialogue will ask you to re-size. If you are at a down-loadable scale, the dialogue will ask you to choose the layers to be exported. Click on the 'Layers to be extracted' link to do this.
- A long list of radio buttons appear - for this map choose 'Roads'. If you are intending to build a map for tramping, get the tracks, contour lines, rivers and whatever else takes your fancy. Scroll all the way to the bottom of the list and click on the 'Extract' button.
- Within a short period of time (depending on the server load and amount of data chosen for extraction) a download dialogue will appear - click on the 'Download' link to download the data to your PC. A ZIP file will be downloaded.
- Go back to step 5 and scroll the map to the southern half of Hamilton - aim to get a small overlap with the first map. Extract another file with the same selection of 'Roads'. You have now finished with the LINZ website - the rest takes place in GPSTrackmaker and MapDekode.
- Open the first ZIP file and extract the contents to a new working directory.
- Start GPSTrackmaker
- Follow the menu path File | Open | and change the file type to ESRI Shape (*.shp)
- Navigate to the working directory where the contents of the downloaded ZIP file were extracted to
- Choose Road_cl.shp
- The import dialogue screen will appear - in the right hand section choose 'Name' - this will give each imported track it's name from the LINZ extract.
- Also in the right hand section click on the 'Track' button and choose Paved street as the style of line.
- Click on the 'OK' button. All the streets will be imported.
- Unzip the contents of the second file into the working directory.
- This time use the menu path File | Marge | and change the file type to ESRI Shape (*.shp)
- Follow the menu path File | Import | ESRI Shape (*.shp)
- Navigate to the working directory where the contents of the downloaded ZIP file were extracted to Choose Road_cl.shp
- The import dialogue screen will appear - in the right hand section choose 'Name' - this will give each imported track it's name from the LINZ extract.
- Also in the right hand section click on the 'Track' button and choose Paved street as the style of line.
- Click on the 'OK' button. All the streets will be imported. You should now have all the streets in Hamilton on screen.
- Use the draw rectangle tool (the white box on the left hand toolbar) to draw a box around Hamilton. This creates a new tracklog.
- Once you have drawn the box, change back to the arrow selection tool.
- Right click the box you have just drawn - a properties dialogue will pop-up.
- Change the tracklog name to 'Hamilton Streets'. This name will be used on the uploaded map in the GPS, and in the upload list of IMG2GPS.
- In the tracklog properties dialogue, click on the polygons tab, and select 'Yellow map background', then click 'OK'. The area of your map will turn yellow and the streets will disappear.
- Left click the box tracklog that you just named in step 29 and then click on the 'Send to back' button on the left hand toolbar. The streets will appear again on a yellow background. This process defines the are of the map.
- Save the file as a MapDekode Text file (*.DBX) - name it nnnnnnnn.DBX where nnnnnnnn is a unique 8 digit number. Garmin have different Ids for each map they produce, as well as all the third parties developing maps (which now includes you!) For the map ID code I use the first 6 digits of my telephone number in international format: 649411… I then add on another two digits for the specific map. This gives me a number range of 100 potential maps without having to dream up an ultra complex numbering scheme. For this example I'll use 64941200.DBX
- You may get an error at this point saying there there are more than 255 points in a tracklog. Use the menu path Edit | Select all, then Tools | Tracklogs / Routes | Tracklog Reducer. In the pop-up dialogue, select the 'Cut tracklog if it exceeds...' and enter 230 as the limit. Click the 'Reduce' button. This will cut any excessively long tracklog down. You may need to re-edit some of the cut tracklogs to make them less 'angular'. Go back to the previous step once complete and save the file as a DBX.
- Now we are going to reload the file we have just saved - yes - even though it is on screen.... Follow the menu path File | Open.
- Change the file type to MapDekode Text file (*.DBX) and open the file you just saved.
- A dialogue box will pop-up and ask "Importing 64941200.dbx Do you want to add the parameters of symbol, zoom and style to the waypoint comments and tracklog names". Choose 'yes'
- The streets will appear on screen with some code tacked onto the ends on their names, this is where GPSTrackmaker is very powerful and quick in manipulating objects....
- Select one of the roads and look at it's properties... it will have a name like "GREENHILL ROAD <S=&H5><Z=5>". The <S=&H5> is a special code that determines the type of line to display on the GPS screen, while the <Z=5> is another special code that determines how far zoomed out the object will appear on the GPS screen. Close the properties dialogue once you have had a look.
- Follow the menu path Edit | Replace.
- In the 'Find what' field, enter <S=&H5>
- In the 'Replace with' field, enter <S=&H6>
- Click 'Replace all' (takes less than a second for Hamilton)
- In the 'Find what' field, enter <Z=5>
- In the 'Replace with' field, enter <Z=0>
- Click 'Replace all' and then exit once it has finished (takes less than a second for Hamilton) Exit the search and replace dialogue. What we have done with the <S=&H5> is to change the line type to residential street <S=&H6>. H5 is a thicker arterial road type that doesn't look so good when used for dense city streets. The <Z=5> was changed to <Z=0> to set the zoom level for the streets.
- Select the background box tracklog and change it's <Z=n> to <Z=2>
- Save the file again as a DBX - it's OK to overwrite the file.
- Start MapDekode.
- Follow the menu path Map Create | Detail map from DB (*.DBX -> *.img)
- Leave all the parameters in the pop-up dialog as they are except for the zf - change it to zf=15 (19m) - experiment later... (OK, Block = 512 should be changed to a higher number if you are creating a img file bigger than 1 meg. The zf=17 sets the best zoom detail range for the map. zf = 17,16,15 are fine for city maps, you may have to experiment with the zf if the maps get too big and you need to cut some detail.)
- Click on 'OK' and choose the 64941200.dbx file. Within about 15-20 seconds MapDekode will build a file called 64941200.img in your working directory. This map is now ready to upload to your GPS.
- Start IMG2GPS - you may have to have to have this installed in the same directory as SendMap.
- Click on the 'Load Folder' button and navigate to the directory where you saved the IMG file.
- A list of IMG files will appear. Put a tick next to Hamilton Streets and then make sure your GPS is plugged in to the serial port, and turned on.
- Click on 'Upload to GPS' button, and the transfer will start. Note that this will overwrite any other maps that have been uploaded to the GPS.
- Once the upload is complete, the GPS will 'reboot' and the map should be available. If the new map does not show, check that the ID is not being used by another map you uploaded - conflicting ID's will cause no maps to display.


