Skip to content

Instantly share code, notes, and snippets.

@LieBtrau
Last active September 7, 2016 18:30
Show Gist options
  • Save LieBtrau/aa1b1065dc0467c604b3601bbea28613 to your computer and use it in GitHub Desktop.
Save LieBtrau/aa1b1065dc0467c604b3601bbea28613 to your computer and use it in GitHub Desktop.
Garmin - OpenStreetMap - Routable

Intro

OpenStreetMap can be used to create free maps for your Garmin. You could download those maps from services like OpenStreetMap.nl. Those maps contain a lot of unnecessary features (houses, woods) that make it hard to follow your route (see the screenshots). So if you want a map that makes it easy for you to keep on track, follow this guide.

Guide

Step 1. Download the map-data

You could use XAPI Query Builder to draw a bounding box and download your maps, but that frequently fails because servers are overloaded. It's better to download a recent map from Geofabrik.
Download the files with ".osm.pbf"-extension.

Step 2. Define the bounding box

If you only want a subpart of the download map, you'll have to define a bounding box. The most easy way is to draw a bounding box on HarryWood. Then copy the "--bounding-box" and following parameters in the Osmosis command text box.

Step 3. Cutting bounding box from map

  • Download Osmosis
  • Run the command line
C:\Garmin\osmosis\bin\osmosis.bat --read-pbf file=europe-latest.osm.pbf --bounding-box top=51.63166 left=2.18628 bottom=49.35376 right=6.69067 --used-node --tf accept-ways highway=* --tf reject-relations --write-pbf file=BeluxBox.pbf 

Step 4. Splitting map into tiles

  • Download the map splitter here.
  • Run the command line
java -Xmx1500m -jar splitter-r305\splitter.jar --max-nodes=1100000 BeluxBox.pbf

Step 5. Compile tiles into a Garmin map

  • Download the mkgmap tool
  • In the following command line, the map number "5001" can be replaced by any unique number not used already by another Garmin map on your system. You could check the website.
  • Run the command line
java -ea -Xmx1500m -jar mkgmap-r2651\mkgmap.jar --route --gmapsupp -c template.args --tdbfile --family-id=5001 --family-name="5001" --series-name="5001" --area-name="5001" --description="5001" --nsis

Step 6. Make installer

If you want to use the map with Garmin Mapsource, you can create an installer for your map in this step.

  • Download NSIS
  • Run the command line
"C:\Program Files\NSIS\makensis.exe" osmmap.nsi

Step 7. Install the map

Make sure to run the installer with administrative rights.

Useful links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment