Poster of Linux kernelThe best gift for a Linux geek
MKGMAP

MKGMAP

Section: User Commands (1) Updated: April 13, 2008
Local index Up
 

NAME

mkgmap - Generate Garmin maps from OpenStreetMap data  

SYNOPSIS

mkgmap [options] files.osm ...  

DESCRIPTION

This manual page documents briefly the mkgmap command.

mkgmap is a program that converts OpenStreetMap (OSM) data into a map that can be loaded onto a Garmin GPS device.
The mapping between OSM features and the features in the map can be customized with a file.  

OPTIONS

-c <filename>
The given file is opened and each line is an option setting of the form option=value, just like on the command line except that there is no leading '--'.
-n, --mapname=name
Change the name of the map. Garmin maps are named by 8 digit numbers. The default is 63240001. It is best to change the name if you are going to be making a map for others to use so that it is unique and does not clash with others.
--description=text
Sets the descriptive text for the map. This may be displayed in QLandkarte, MapSource or on a GPS etc.
--style-file=file
Use your own map features file. You can totally change which features are shown and at what levels. See CUSTOMISING THE MAP below.
--levels=levels code
Change the way that the levels on the map correspond to the zoom levels in the device. See CUSTOMISING THE MAP below. The default is the equivalent of: "0=24, 1=22, 2=21, 3=19, 4=18, 5=16" although this may change.
--latin1
This option allows the use of non-ascii characters in street names. It is hardware dependant what is actually supported on a particular device. Some devices can only do ascii characters for example.
Mkgmap goes to some length to convert un-displayable characters however. It will convert accented characters that cannot be displayed in the chosen character set into unaccented characters.
 

CUSTOMISING THE MAP

You can completely change which features are displayed and at what zoom levels.

There are two concepts 'resolution' and 'level'.

 

Resolution

is a number between 1 and 24 with 24 being the most detailed resolution and each number less is half as detailed.
So for example if a road was 12 units long at resolution 24 it would be only 6 at resolution 23 and just 3 at resolution 22.
On a Garmin Legend Cx the resolution corresponds to these scales on the device:
16 30km-12km
18 8km-3km
20 2km-800m
22 500m-200m
23 300m-80m
24 120m-50m

It may be slightly different on different devices.  

Level


is a number between 0 and 16 (although perhaps numbers above 10 are not usable), with 0 corresponding to the most detailed view. The map consists of a number of levels starting (usually) with 0. For example 0, 1, 2, 3 and a different amount of detail is added at each level.
The map also contains a table to link the level to the resolution. So you can say that level 0 corresponds to resolution 24.
You can specify this mapping on the command line, for example:
--levels=0:24,1:22,2:20
This means that the map will have three levels. Level 0 in the map will correspond to resolution 24 (the most detailed), level 1 will show at resolution 22 (between scales of 500m and 200m) and so on.  

Map features

Custom map features can be applied using a delimited file among with the --style-file command line option.
A typical line may look like this:

point|amenity|grave_yard|0x64|0x03|23

Column 1 is point, polyline or polygon, depending on whether the feature is a point of interest, a line feature such as a road or an area such as a park.
Column 2 and 3 are taken exactly from the key and value columns from the OSM map features.
Column 4 is the garmin code that you want to use.
Column 5 only applies to points and also determines the type of the object.
Column 6 is the minimum resolution at which this feature will appear.

The file /usr/share/doc/mkgmap/garmin_features_list.csv has a list of known type values used by Garmin.

 

ACKNOWLEDGEMENTS

This project is almost entirely based on the file format specification document written by John Mechalas at the SourceForge project at http://sourceforge.net/projects/garmin-img.  

SEE ALSO

josm(1), qlandkarte(1).  

AUTHOR

mkgmap was written by Steve Ratcliffe <sr@parabola.me.uk>.

This manual page was written by Andreas Putzo <andreas@putzo.net>, for the Debian project (but may be used by others).


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
CUSTOMISING THE MAP
Resolution
Level
Map features
ACKNOWLEDGEMENTS
SEE ALSO
AUTHOR

This document was created by man2html, using the manual pages.
Time: 21:23:56 GMT, April 16, 2011