Mapping la vida loca





 Maps & Geocaching


These pages contain information on generating free maps for Garmin devices. Garmin offers commercial map products for its GPS units. These are expensive. As with most things in the world, there is a free version which is just as good. Let me break it down for you: there are three options.

  1. Easiest: download a pre-rendered Garmin image file and save it to your GPS
  2. Moderately easy: render your own image file
  3. More detailed: understand a lot more about rendering your own image file (opens on a separate page).

Easiest way to get free maps for your Garmin GPS unit

  1. Visit the OSM on Garmin page
  2. Select a provider for the country you're interested. Optionally, decide whether you want a routable map or not. For instance, I use Lambertus' excellent site
  3. Download the image file (or in the instance of Lambertus, follow the instructions to 'order' your image file.
  4. You should now have a gmapsupp.img file. Copy this to the Garmin folder on your GPS unit.

How to create free maps for your Garmin GPS unit

OpenStreetMap (OSM) (see here for the wiki) is an open source alternative to many commercial map offerings (including Google Maps). You can read all about it on the actual site. All we really need to know is that you can use the data generated by OpenStreetMap to create Garmin image files that can be used by your Garmin GPS unit, avoiding the need to purchase Garmin's expensive City Navigator (or other) map series.

The following instructions assume a modicum of familiarity with computers and that you are using Windows. At the very least, you have to be able to know how to install software and open the command prompt.

Installing the right software.
This is just a matter of downloading a few files and placing them in a directory that you'll remember.

  • Download and install splitter. Splitter takes a chunk of OSM data and splits it into tiles that are small enough for mkgmap to work on (mkgmap crashes if you give it too much data).
  • Download and install mkgmap. mkgmap takes OSM data (as individual tiles, if you have already run splitter) and renders it into a Garmin img file that you can load into your GPS unit.
  • If you don't already have it, install java (you probably do already have it).

Getting the map data
OpenStreetMap (OSM) offers various ways to get its data, including API calls. The simplest way I've found is to get a pre-made extract (done by someone else). This is simply a chunk of the total planet-wide map for a specific area. A list of websites that offer extracts is available here.
A reliable source that I have often used is geofabrik. The remainder of this how-to explains how to create a map for the UK.

  • Download the latest UK extract (scroll down and download the great_britain.osm.bz2 file).
  • Save the extract in the same folder as you installed mkgmap and splitter.

Splitting the OSM data into smaller tiles

  • Open a command prompt, navigate to this same folder and type
    java -Xmx1500m -jar splitter.jar --max-nodes=1500000 osmfile.osm
    • --Xmx1500m sets the amount of memory reserved for splitter. You can reduce or increase this (bearing in mind that it's in megabytes, so if you use -Xmx1500m you need at least 1.5 Gb of spare RAM.
    • --max-nodes=1500000 sets the size of each tile. If you don't use this switch, splitter will use a default value of 1600000. On my computer, rendering a UK map, this results in tiles that are too big for mkgmap, but 1500000 works fine. YMMV
    • osmfile.osm is the name of file you want splitter to work on. In this example, it would be great_britain.osm
    If all goes well, splitter will terminate OK, but almost certainly end with some errors of the sort "Too many relations in ...". See the advanced page for more info, but you don't need to worry too much about this error.

Rendering the tiles into a Garmin image file

  • Run mkgmap using the following command
    java -Xmx1500m -jar mkgmap.jar --route --net --gmapsupp -c template.args
    • --route Enables routing (i.e. renders the map in such a way that you can get your Garmin unit to create a route between two points for you)
    • --net Enables "lock to road" option on the map
    • --gmapsupp Makes mgkmap create a single gmapsupp.img file, as well as individual images for each of the tiles created by splitter
    • -c template.args Tells mkgmap to use the set of tiles created by splitter and listed in the template.args file (which was also created by splitter)

Almost finished! The last step is easy. Copy the gmapsupp.img file into the Garmin folder of your GPS's memory card. Be aware that if you already have maps on your Garmin, they will be wiped out by doing this. Best to take a copy of whatever was already on your memory card before you start. In my case, I had no maps on my unit, so had nothing to lose.

  Copyright 2005-2009 All Rights Reserved