Garmin GSX60 and OpenStreetMap¶
This site describes the necessary steps and tools I use to get my Garmin CSX 60 GPS up and running an put local map from OpenStreetMap on it.
What I use¶
The current configuration is
The idea¶
The idea or the task is quite simple: get some maps, preferably without paying for them, and put them on the device so you can actually use them. And the best: Do it once and do it right, so you don’t have to do it again (meaning: get as much information on the card as possible).
Where to get Maps¶
Beside the usual maps you can buy from you street dealer you get all you information already from the OpenStreetMap project. Many, many thousands of small and busy bees are running around all over the world and tracking their moves and putting all this information into their database. The information from all over the world results in a 15 GB compressed file, so it’s actually quite a lot they have there.
There are different ways of getting the data. If you’re up for just local stuff, you can select the area you like and export it directly from the site. How ever, there’s a limit of about 5000 knots and as soon as you reach it the export will time out. For small local events it’s enough, though.
Since I wanted to go for the bigger deal and put whole countries on the device I found several websites offering regular updated dumps from single countries and regions. Downloading those has been a good starting point (check the download sections at the bottom of this page for links).
You can feel free to make your own maps and drop just the stuff you don’t need. Information how to do this are freely provided by the OpenStreetMap web-page.
OpenStreetMap XML to OSM¶
This is the only annoying part for me. Not, because it’s so difficult, just because I can’t automate it that easy as I could do it with the other steps. Luckily it’s only necessary for the local files directly downloaded from the OpenStreetMap web-page. All other resources offer their data already as OSM files.
For converting the downloaded *.xml
files to *.osm
files I just start josm, load the file and save it with the ending .osm
. That’s it.
Convert OSM to IMG¶
For converting *.osm
files to *.img
files (the ones compatible with Garmin), I use mkgmap. No big deal. Basically the command goes like this:
$ jar --jar mkgmap.jar [options] file.osm
The script osm2img.sh
takes over the part for the parameters and options.
Merge IMG¶
As long as you’re only using one IMG file you don’t need to do the next step. This is just useful, if you - let’s say - want to have the countries “Norway” and “Germany” on the device at the same time. The Garmin devices only supports one file at a time, no matter if you copy more on the storage card or not. So you have to merge the different IMG files into one. Again mkgmap is your tool of choice.
$ jar --jar mkgmap.ar --gmapsupp [options] [IMG FILES]
Here are a couple of more parameter necessary, so the script creategmap.sh
steps in. It will create you a file with the name gmapsupp.img
within the working directory.
Get it on the Device¶
Now we’re coming to some Garmin specific stuff. You get your IMG file on the device by simply mounting it as USB-Device into the file system. Then create a folder garmin
in the root folder of the card. Put the file with the name gmapsupp.img
into it and un-mount the storage.
The GPS device should now be able to load the file and show you streets and all the other data you’ve converted (such as POI, e.g.). Files with other names or other locations will be ignored.
You might have to be a bit patient as well: The Garmin device doesn’t have on of the quickest interfaces, so copying the 812 MB (in my case) takes a while.