Load an OSM map onto a GPS device with a Mac

When our new flatmate asked me if I could help her to install an Openstreemap map of the Central African Republic on her recently acquired hand-held device, I replied “Sure! I only take a couple of minutes.” with great confidence. I’ve been generating my own garmin map from geofabrik’s extract of the whole continent and have a fresh one at hand. Little did I know about the actual situation. It took a lot more than a couple of minutes to find out the right tools. I hope to make it easier for other people with this blog post.

The first surprise came when I opened the battery compartment to extract the micro-SD card: Garmin Etrex Legend H does not support memory cards. It does have an internal memory of 24MB and a USB port though. The second funny news was the she had a Mac. It may not sound alarming at first, but getting your OSM data to that particular device using a Mac isn’t that straight forward. MapSource isn’t available on MacOS but Garmin provides two pieces of software: MapManager and MapInstall. In short, the complete chain is this:

  1. Get the OSM data of the area of interest
  2. Convert it to Garmin format
  3. Convert it to a Garmin format manageable by the Mac tools
  4. Install the map on your Mac
  5. Send the map to the GPS unit

and voilà! 🙂

Let’s take a closer look at the various steps:

1. Get OSM data.
Geofabrik provides extracts for continents, countries and even breaks down some countries into regions. However, few African countries have their own extracts. Since the Legend H has little memory, I used OSMembrane to cut data for CAR out of the africa.osm.bz2 dump with this membrane. I really like this tool, it’s a very nice and easy to use front-end to osmosis, a command line application for processing OSM data.

2. Convert to Garmin format
mkgmap is the tool for the job. It’s a command line application with many options (I’m not aware of a graphical front-end. UPDATE: there ARE some GUIs. I shall check them some day). In our case, the important argument is –tdbfile to explicitly generate the TDB file, which is needed by the next step. java -jar /home/seb/bin/mkgmap.jar –gmapsupp –tdbfile CAR.osm
This will generate a TDB file and some IMG files. If the GPS unit supported external storage, we could copy the gmapsupp.img to a folder “Garmin” on the memory card.

3. Convert to a Mac-manageable format.
Garmin offers a converter that runs only on windows. However Gmapibuilder (mac-installer) is multi-platform and will convert the previously generated maps to the gmapi format, which is manageable on MacOS. Open the TDB file generated at step 2 and convert.

4. Install the map on your Mac.
There are several pieces of software to manage maps on Mac. The first option I came across was MapInstall and MapManager whereas RoadTrip seems to be the MapSource equivalent to Mac. Use MapManager to install the gmapi map to your System. (I guess RoadTrip can do that too, but haven’t tried).

5. Send  the map to the GPS unit.
Launch MapInstall and you should see the map installed at step 4. Plug the GPS unit to your computer’s USB port and MapInstall will detect it. Select the piece(s) of maps you want to send and click Send. That’s it!

I’m looking at automating steps 1-3 and will publish the maps for Africa and various countries regularly.


Tags: , , ,

2 Responses to “Load an OSM map onto a GPS device with a Mac”

  1. Miguel Says:

    Nice technical documentation! 😛

    I have a Garmin Legend too (not even the ‘H’ model), and my home computer is also a Mac. I gave up pretty soon (that was three years ago, maybe not all the software was available back then) and installed a Windows virtual machine, only used to download maps and waypoints into the Garmin. Ah, and a little bit of Visio every now and then 🙂

  2. WingedStone Says:

    Thanks 🙂
    Gpsbabel (CLI and GUI) is a very good tool to handle waypoints and tracks for various GPS units and file formats.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: