logo separator

Background

The mkgmap program is distributed in Java archive format compiled for use under the Java Runtime Environment 8. You will need the Java SE Runtime Environment 8 installed on your system in order to run mkgmap.

Garmin maps consist of a series of .img files, with each file containing the data for one tile of the map. Unless you intend to build a very small map, you will need to use the accompanying splitter program to split your map into smaller tiles. The individual tiles can be joined together to produce a single gmapsupp.img file which contains the whole map and can be copied into the /Garmin folder of an SD card for use by a GPS device. If you want to create more than one map for use on your GPS, the gmapsupp.img files can be renamed to be unique, for example gmapsupp1.img, gmapsupp2.img.

A typical simple example using both splitter and mkgmap:

java.exe -Xmx2g -jar splitter.jar england-latest.o5m
java.exe -jar mkgmap.jar --gmapsupp -c template.args

The first command splits the Open Street Map data into smaller files with each file containing the data for one tile of the map. It also produces a file named template.args that contains the names of all the generated files.

The second command takes as input all the individual files listed in the template.args file generated by splitter, produces a .img file for each tile, then merges all the tiles together into a single gmapsupp.img file.

Documentation

The documentation that is currently available on this site is listed below.

Command line options The mkgmap command line options. This is also available using the command:

mkgmap --help=options

Style Manual [pdf] This is the complete documentation of the style rules that determine how the OSM tagged features are converted into Garmin features.

TYP Compiler Manual This documents the language that is accepted by the TYP compiler that is included within mkgmap.

Logging Instructions on how to control messages that are logged and to where they are written.

Tuning Instructions on how to minimise execution time and avoid running out of memory.

Further information can be found in the Open Street Map wiki

Debug is enabled on this site.

Latest commits

  • display-r593 The offset into symbols is written with 2 bytes if length of symbols > 127, so the width of the ....
    17 jan 2022
  • display-r592 fix copy+paste error for RGN 5.
    16 jan 2022
  • display-r591 - fix overflow when --print=15 is used with compressed data.
    15 jan 2022
  • display-r590 - extract mdr16 stuff into new class HuffmanDecoder.
    13 jan 2022
  • display-r589 - call readAllStrings also with compressed Strings for now (avoids invalid buffers in BufferedImgFileReader).
    12 jan 2022
See more...