mkgmap inner polygon

when creating Garmin-Maps using “mkgmap 1067” i’ve problems with creating one polygon into another.

On there’s a church inside a cementery, the polygons are related by multipolygon, the church is the inner polygon and the cementery the outer one. These objects are rendered well on the online-charts (mapnik, osmarender); but with mkgmap there’s only a hole in the cementery, the church is not to be seen (in MapSource and on GPS).

So my question:
Is it a bug in “mkgmap”? Is it an error of using “mkgmap” (any missing option, …)? Is it an error when creating the objects with “josm”?

Perhaps your problem is related to one of the symptoms described in this email? At least it’s clear that Mkgmap’s support for multipolygons is not 100%.

Thank’s for the answer.

My Problem could be the “Problem 1” in the email. According to the email i think, the developers of “mkgmap” know the problem. There for, it’s all done for the moment - hoping for the solution in a further version of “mkgmap”.

There is a special multi polygon version of mkgmap which you could try out… :wink:


I could test a new version. Can you tell me, where i can find the download - the executable files? And can you tell me, where to post my test-results … if you want.

I think there is no official download for the multipolygon-branch. Must be compiled.

But I uploaded it here:


The MP code was added to version 1195:


Thank you for the informations.

With both listed versions of “mkgmap” my problem with the inner polygons is done.

In my tests 2 other Problems raised up: regard it as informations to the developers of “mkgmap”
1.) in the points-style-file (its the “masterstyle” of “DE: All In One”) the german umlaut “ö” in the word “döner” isn’t accepted by “mkgmap” - it terminated with some strange messages “Error in style … Stack size is …” and “Could not open style null”.
2.) with modified points-style-file i got lot’s of error messages “Road … (OSM id …) contains zero length arc”, the generation of the img-files continues and the generated img-files are accepted by “MapSource”. The roads named in the error message is to be seen in “MapSource”, but routing from that road to other roads nearby crashes somtimes in “MapSource”, to other nearby roads not. Same crashes of “MapSource” can be reproduced with img-files, produced with “mkgmap”-Version 1067.

For information:
I’ve downloaded the bavaria-part of the osm-dump from “geofabrik” and splitted it with “splitter”.

To avoid this problem, use “–remove-short-arcs” as an option for the Mkgrmap command.
This is caused if sections of ways are very short, due to the limited precision of coordinates, which breaks routing. So this option will remove them and make routing work.

thank you for the hint - routing is improved a lot. :slight_smile:

Does anyone have the multipolygon-fixed branch merged into a build that has the --generate-sea code included?

I’m having a few troubles with the area around Kochi in India


As far as I’m aware, --generate-sea has been included in mkgmap trunk for a while now. I haven’t managed to get it to work for an entire country (the UK, with OSM coastline data only) but others have reported some success with smaller areas.

Yes, --generate-sea seems to be working for the sea, but once you get inside the bay, something isn’t right.

The thread above indicated some fixes in a separate multipolygon branch. Any idea if this has been merged in?

If so, then it might be an issue with the way the water area has been captured in OSM. I’m not experienced enough with Josm to be able to tell. This is the area.

Searching back the Mkgmap mailinglist shows that multipolygon is an ongoing work. A major commit with multipolygon changes is r1198.

Generate seas is not perfect currently.

I noticed some multipolygons still aren’t rendered very well with the latest mkgmap versions (15xx). How can I render this relation with an outer way natural=water as lake and an inner way natural=water as island?
How/where can I get those multipolygon versions of mkgmap?

If the inner way is an island, it should not be tagged as natural=water. Either leave it untagged, or tag it as natural=land, or something more specific depending on what it is, eg natural=wood or leisure=park etc.

I thought so too, but here in the Netherlands a lot of those ‘islands’ are tagged that way (automatic import from AND data I believe). Maybe there is a way to change those tags automatically, although they are rendered ok on mapnik/osmarender.