logo separator

The mkgmap blog

The mkgmap program converts map data from Open Street Map into the Garmin img map format that can be loaded onto Garmin GPS devices. For more information see the OSM mkgmap wiki page or the mkgmap home page.


Subversion upgrade

18 Aug

The subversion repository for mkgmap has been upgraded to 1.5 and at the same time it was moved to a different machine. You don't have to do anything and everything should look the same as it was, but I'm letting you all know just in case I've forgotten to set something up properly.

If you see that the latest version is 665 or above then you are seeing the new server.

mkgmap now in Debian

2 Aug

There is now a Debian package for mkgmap, in "sid".

Thanks to Andreas Putzo who made and uploaded the package and to the debian GIS team. Andreas also wrote the mkgmap man page which has been incorporated into the main mkgmap code base.

Nightly builds are currently disabled

13 Jul

I stopped the nightly build that produces the mkgmap snapshots for a while as there are a number of changes being made that are large and not well tested. It has always been the case that the nightly snapshots are almost always perfectly usable and quickly fixed if not. Usually they are better than the version that is marked as "stable". So they are disabled until this is likely to be true again after branches are merged back to the main trunk.

Of course feel free to build from subversion if you want to experiment with the latest and greatest.

Moving to java 1.6

12 Jul

Just a quick note to say that in the not too distant future, mkgmap will require version 1.6 of java to run.

Really the only reason why this is not the case at the moment is so that it can run with gcj. However it just doesn't really work with gcj anyway as it either runs very slowly or goes into a never ending loop. If that were the only Free Software java then I would try to make it work, but Sun's version of Java is now available under the GPL licence and it works so much better for this application. So openJDK (also known as Iced Tea) is the only reliable way of running mkgmap and as this is 1.6 there is really nothing left preventing a switch to version 1.6.

Having said all that, nothing will change until there is something added that actually requires 1.6, this is just advanced notice.

Tile clipping

1 Jul

A new feature has been added to mkgmap to clip all features exactly to a bounding box. This allows you to create tiles that meet exactly without overlapping. The general idea is that you start with an area that is slightly larger and then chop it down with in mkgmap. It will work even if a line crosses the area without any nodes being inside. The example uses osmosis, but any software that adds the bound element to the osm file will work and I will probably add an option to specify the bounding box manually later as well.

This is quick example that I made to try it out. Normally you would probably have larger tiles. First I ran osmosis on a uk osm file to create two small tiles. Two bounding boxes were created that shared a vertical side at -0.24 degrees longitude.

osmosis --rx uk-080623.osm.gz enableDateParsing=no \
    --tee 2 outPipe.0=a outPipe.1=b \
    --bb inPipe.0=a completeWays=yes top=51.65 bottom=51.55 left=-0.34 right=-0.24 \
    --bb inPipe.0=b completeWays=yes top=51.65 bottom=51.55 left=-0.24 right=-0.14 \
    --wx uk-test-1.osm.gz \
    --wx uk-test-2.osm.gz 

The completeWays argument makes osmosis include the whole way when any part of it is inside the bounding box. This is essential otherwise there will be gaps between the tiles. Thats all there is to it really. You can now run mkgmap on those tiles normally.

A picture probably says it better than words. Here you can see the clipping in action in QLandkarte displaying one of the tiles produced. This screenshot was taken before points were excluded from the bounding box, which is why you can see a few stray ones outside the box.

clipping example

Here is what the same data file would look like before clipping.

example without clipping

Previous posts

Translate

Translate this page into another language