Archive for the ‘Uncategorized’ Category

Load an OSM map onto a GPS device with a Mac

April 16, 2011

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.


Hello world, again!

March 19, 2011

I created this blog about 4 years ago, and never actually posted anything; I guess I had nothing interesting to say.
Seeing the challenges I’m going to tackle, this is about to change! 🙂

I have just joined the MapKibera team and will support them in their work of mapping the slums of Nairobi (Kibera and Mathare so far) for the next three months.

I’ll try to blog “regularly” about the project, technical or not, and stories a mzungu like me is likely to experience in such a new environment. Stay tuned! 🙂

Hello world!

March 13, 2007

Welcome to This is your first post. Edit or delete it and start blogging!