OSM Map On Garmin/Cycle map

From OpenStreetMap Wiki
Jump to: navigation, search
Help
Available languages
Deutsch English

OSM Map On Garmin

You can put a cycle route-focused map on your Garmin GPS, made from OSM data. This page explains how to build it - if you just want to download a pre-built one for the UK, go to OSM Map On Garmin/Download.

Gloucester, showing national cycle routes in red

Contents

What it does

What it doesn't

Prerequisites

svn co http://svn.openstreetmap.org/applications/utils/export/garmincyclemap/network/cyclemap

Step-by-step

Make sure you can remember where you've downloaded things, and change the paths accordingly!

Splitting the planet file

Most countries are too big for mkgmap to handle as is, so you need to split them into several tiles. Use a command like this, checking the paths to splitter.jar and your planet extract:

java -Xmx1024m -jar splitter.jar --max-nodes=900000 great_britain.osm

Creating Garmin .img files

Make sure that you edit the path to the cyclemap rules if not in a subdirectory named "cyclemap". Confirm that the cyclemap rules are available:

java -jar mkgmap.jar --style-file=cyclemap --list-styles

mkgmap should respond with something like:

The following styles are available:
.svn               1.0: Cyclemap

You now need to convert your (split) .osm files into Garmin .img files.

java -Xmx1024m -jar mkgmap.jar --remove-short-arcs --style-file=cyclemap --route --net --no-sorted-roads -c template.args

Getting contours (optional)

For a really cool map, it's good to have some contours. The .typ file already includes styles for these, but you need to download the contour data, and convert it into Garmin .img files.

For Great Britain, just download all the .zips from the Scottish Mountaineering Club, unzip them all, and put the .img files in one directory. Alternatively, use Ordnance Survey OpenData contours - OS OpenData Contours on Garmin.

For other countries, you can use the very latest versions of mkgmap to create .img files from NASA SRTM files. I don't have any experience doing this - sorry. It's documented on the mkgmap-dev mailing list.

Combining them all into a Garmin map

Make sure that you edit the path to cyclemap.TYP if it's not in the same directory:

java -Xmx1024m -jar mkgmap.jar --gmapsupp --family-id=NNN *.img cyclemap.TYP

Where NNN is the family id of TYP file. NOTE: If you don't know what the family ID is, just replace NNN with 0 (the default family ID).

You now have a gmapsupp.img file you can copy to your GPS. Just connect via USB, select 'USB Mass Storage' on the GPS (Setup->Interface), go to the Garmin directory (create if there isn't one - upper case 'G', lower case 'armin'!), and copy gmapsupp.img there. The UK is 240Mb in size.

Please note the extension of the type file must be .TYP, .typ does not work.

More information

Can you help?

You could help fix the routing or refine the styles (using this TYP editor). All the code is in svn, patches are welcome.

Or why not help by producing maps for your country, and offering them for download?

Thanks!

Thanks go to:

Why doesn't it work?

Other Garmin cycle maps are available!

You might find another map suits your form of cycling:

Personal tools
Namespaces
Variants
Actions
site
Toolbox