Mkgmap/help/How to create a map

From OpenStreetMap Wiki
< Mkgmap | help(Redirected from Mkgmap/help/usage)
Jump to: navigation, search
Help
Available languages
English
Mkgmap
Help
Routing
i18n
Known issues
Development
Download maps

mkgmap is a very flexible tool with lots of command line options and a powerful style system to configure the contents of a map. But there are common steps you have to perform to create a map from OSM data. This pages describes how to create a map for Garmin GPS devices. It supports routing (for cars) and searching for addresses.

You need to download the following software / tools:


1. Install the Java Runtime Environment 1.6 or 1.7 if not already installed

2. Download the OSM data (.osm, .osm.pbf or .osm.gz) of the map area.

Some websites offer region extracts that can be easily downloaded:

3. Most of the downloaded region extracts are too big to be processed by mkgmap at once. Use the tile splitter program to divide them into smaller pieces called tiles.

java -jar splitter.jar europe.osm.pbf
This creates a number of tiles each one containing a smaller section of the complete map area. The tiles are named 63240001.osm.pbf with increasing numbers.

4. To get address search working mkgmap needs precompiled bounds tiles to evaluate the city, zip code, region and country of each POI, line and polygon. You can create the precompiled bounds tiles yourself or you can download them from navmaps.eu. In this case extract them and put the extracted files to a subdirectory named bounds.

5. Run mkgmap to compile the tiles and a gmapsupp.img which is ready for the GPS. Before starting mkgmap copy all tiles created by splitter (6423*.osm.pbf) to the mkgmap directory.

java -jar mkgmap.jar --route --remove-short-arcs --add-pois-to-areas --index --gmapsupp *.osm.pbf
This creates an .img file for each tile, a gmapsupp.img file and some additional files.

Note: if you get an "OutOfMemoryError: java heap space" running steps 3 or 5 you'll need to increase available memory by using -Xmx parameter (eg. java -Xmx2000M -jar ...)

6. Copy the gmapsupp.img file to the flash card of your GPS (directory /Garmin).

Please do not copy the gmapsupp.img to the internal device of the GPS. You might overwrite one of your Garmin maps or your GPS might become unusable!!

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:

Personal tools
Namespaces
Variants
Actions
site
Toolbox