From OpenStreetMap Wiki
Jump to navigation Jump to search

Page about the development of mkgmap.

Subversion access

The following command will check out the main development branch of mkgmap.

svn co mkgmap

Branches are created temporarily to perform larger pieces of work and appear in the conventional place in directories under branches.

Mailing list

There is a mailing list for mkgmap development. As there is only the one list you are welcome to post anything relating to mkgmap to it at present. If it ever becomes too high volume it will get split then based on the kind of traffic there is.

To join the list you should go to the mkgmap-dev list page.


For details, see Mkgmap/dev/Building.

Once checked out you can use ant to build mkgmap. You need a java development kit (download JDK).

   cd mkgmap
   ant dist
   java -jar dist/mkgmap.jar

Note: to read maps in pbf format, you will also need protobuf.jar and osmprotobuf.jar.

Nightly development builds

The code from subversion is automatically built every day (as long as there have been changes). Click on the link below to see what is available.

daily snapshot directory.

You can always get the latest version from mkgmap-latest.tar.gz. Development versions haven't had a lot of testing but they probably work and will usually have more features than the current stable version.

Applying Patches

Patches (e.g. from the mailing list) can be applied using the "patch utility". The trick with patches is making the filenames that are in the patch, match the files in the current working directory (and below).

In the simplest case, you can say (on the Linux command line)

patch < patchfile

But often, it will complain that it can't find the patch and then you have to either change into a lower subdirectory, and/or use the -p option to patch to tell it to strip prefix directories from the patch filenames. E.g.

patch -p1 < patchfile

Enabling Debugging

Logging can be enabled with java system setting -Dlog.config :

Example file:

# The default level FINE, WARNING, INFO, SEVERE 
#handlers: java.util.logging.ConsoleHandler 
handlers: java.util.logging.FileHandler java.util.logging.ConsoleHandler 
# package or class name with .level appended and then the level
# For ConsoleHandler
# For FileHandler

List of things to do

If you want to get involved in the development, then here are a few ideas for things that need doing.

Language improvements

This is an continuing effort. The characters that can actually be displayed depends on the particular GPS device. Therefore if you want a map that can be used by the largest number of people, we need to produce names that are in upper case ascii, but also allow the flexibility to make maps with other character sets for national maps.

So we need people to check character set rendering on their devices and to provide transliterations from character sets to ascii (or other character sets, the flexibility is there to do that). There is a internationalisation page for this with more information.


As mkgmap gets more sophisticated and gains more options the usefulness of a GUI increases for many people. I made a start on the gui branch, but it would benefit from someone who is more adept at writing GUI code helping out there.

How do I have to use this GUI? How to start it? --Willem1 13:32, 3 August 2009 (UTC)
There is an advanced GUI offered here: OSM_Composer

Installation and scripts to run

Installation and shell scripts / batch files to run the program would be very useful.

Bugfixing routing

Routing support is quite well by now (December 2012). Anyhow some problems are reported when routing over long distances. Experiment with this to find bugs in the code and help understanding unknown parts of the IMG format.