Mkgmap/help/How to create a map
If you want to load OSM data onto a Garmin GPS device, you can either download pre-compiled maps, or you can compile them yourself. This page describes the latter option. The maps produced support routing (for cars) and searching for addresses.
You need to download the following software / tools:
Install Java Runtime Environment 1.7. Both mkgmap and splitter depend upon it.
|Java is commonly available, and it may already be installed on your machine.|
Use splitter to split the raw map data into smaller pieces, called tiles. This is necessary because most of the downloaded region extracts are too big to be processed by mkgmap. For example:
$ java -jar splitter.jar us-northeast-latest.osm.pbf
The resultant tiles are named 6324xxxx.osm.pbf, where xxxx is 0001, 0002, 0003...
These tiles can be compiled into a map as-is, but the resultant map would lack addressing data (e.g. city or zip code). Addressing data comes from preprocessed bounds tiles, and you can either download them from mkgmap.org or create them yourself as described in Mkgmap/help/options#Using_preprocessed_bounds_for_the_address_index. Place the resultant files into a subdirectory named bounds.
Finally, you can use mkgmap to compile the tiles and bounding information into something comprehensible by a Garmin GPS.
$ java -jar mkgmap.jar \ --route \ --add-pois-to-areas \ --bounds=bounds \ --index \ --gmapsupp \ 6324*.osm.pbf
This creates several files, including the coveted gmapsupp.img file. Copy this file onto the SD card used by the GPS. The details are listed here, but here's a quick refresher:
- The SD card should be formatted as FAT32.
- There should be a folder called "Garmin" at the root of the SD card.
- The gmapsupp.img goes into the "Garmin" folder.
|Do not copy gmapsupp.img to the GPS's internal memory! You can brick your GPS!|
|If you get an "OutOfMemoryError: java heap space" error, you'll need to increase the available memory by using the
Tweak your map
You can use several options and the style files of mkgmap to tweak your map to your requirements. Read the following for details: