logo separator


Moving to Java version 7


This is just a notice that Java 7 will soon be required to run mkgmap. Version 7 was released in 2011 so I expect that most people already have it. If not, now is a good time to update in preparation.

Although it was over a year between the announcement that mkgmap would require Java 6 and it actually happening, this time there will not be such a gap!

Weekend in Essen


Over the last weekend I attended the Garmin Project weekend in Essen, Germany. It was great to meet and exchange views with all the other participants.

I am looking forward to seeing the result of the main discussion of the weekend which was to design a web site to help people without any pre-existing knowledge of OSM find maps for their Garmin devices in a simple and straightforward way. In addition there were many other useful discussions, and the chance to meet others face-to-face is very valuable in a project such as ours where the only ongoing contact is via email.

So I would like to thank those that made it all possible, to FOSSGIS who sponsored the event; the Linux Hotel who support open source by providing facilities to events such as this one and to Marc Gehling who in addition to organising the whole event, even cooked lunch for us!

Exit hints


There is a new feature to help creating rules in the style file that help with writing style rules that give a bit more help about motorway exits.

The default style is not affected, this is for style authors to use in their styles. It may not work the same on all devices, so you should experiment with the results.

Usually Garmin devices do not display the name of the exit on motorways while routing with mkgmap created maps. The new feature allows you to create a style rule that names part of the exit link road with the junction number, so that when the device tells you to turn onto that road it will include the junction number.

To make this work you have to specify the --process-exits option. This works by splitting each motorway_link into three parts. All parts are tagged with the original tags of the motorway_link. Additionally the middle part is tagged with the following tags:

 mkgmap:exit_hint_ref=ref # tag value of the motorway exit
 mkgmap:exit_hint_name=name # tag value of the motorway exit
 mkgmap:exit_hint_exit_to=exit_to # tag value of the motorway exit

Adding a rule checking that mkgmap:exit_hint=true makes it possible to use Garmin type 0x01 (motorway) for the middle part so that the Garmin device displays the name of this middle part as a hint where to leave the motorway.

An example of such a rule is given below.

highway=motorway_link & mkgmap:exit_hint=true
   { delete display_name;
     name 'Exit ${mkgmap:exit_hint_ref} ${mkgmap:exit_hint_name}' |
          'Exit ${mkgmap:exit_hint_ref} ${mkgmap:exit_hint_exit_to}' |
          'Exit ${mkgmap:exit_hint_exit_to}' |
          'Exit ${mkgmap:exit_hint_name}' |
          'Exit ${mkgmap:exit_hint_ref}' }
    [0x1 road_class=3 road_speed=2 level 1]

Style functions


In a mkgmap style, you can now do more than just test the values of tags.

Gives the length of a way in meters. This can be used to omit short driveways and the like.
    highway=residential & access=private
       & length() > 50 ...
True if all the nodes of a way were present in the input file.
True if the first point is the same as the last. This can be useful to determine if something might be a polygon when it could otherwise be ambiguous.

This useful feature was added by WanMil.

Creating pre-processed boundaries


In the past you have used the createboundsfile option to create preprocessed bounds used by mkgmap to assign correct address information. This option is now removed and replaced by a separate tool delivered with the common mkgmap download.

The following command chain is an example how to create preprocessed bounds for europe. Additionally to mkgmap you need the two tools osmconvert and osmfilter.

  1. Download the OSM europe extract
  2. Run osmconvert and osmfilter to extract all boundary information:
       osmconvert europe.osm.pbf --out-o5m >europe.o5m
       # The following should all be one line
       osmfilter europe.o5m --keep-nodes=
         --keep-ways-relations="boundary=administrative =postal_code postal_code="
         --out-o5m > europe-boundaries.o5m
  3. Start the new mkgmap bounds preprocessor:
       # The following should be all one line
       java -cp mkgmap.jar
    This will create a directory called europe_bounds containing the preprocessed bounds which can be used with the bounds option on the mkgmap command line.
<< Earlier news Later news >>

Latest commits

  • mkgmap-r4287 simplify code, no functional change.
    05 jun 2019
  • mkgmap-r4286 mdr5.patch by Ticker Berkin:.
    16 apr 2019
  • mkgmap-r4285 add tag mkgmap:way-length for each POI generated from a line when option --add-pois-to-lines is used. It gives the way length ....
    07 apr 2019
  • mkgmap-r4284 let test-map:all-elements set the transparent flag, use 0x1b instead of 0x51 for background.
    27 mar 2019
  • mkgmap-r4283 document special case with relative path for option input-file given in a config file like template.args.
    08 mar 2019
See more...