logo separator

[mkgmap-dev] Commit: r1135: Patch by Rudi for problems with multipolygons

From svn commit svn at mkgmap.org.uk on Sat Aug 15 18:35:33 BST 2009

Version 1135 was commited by steve on 2009-08-15 18:35:33 +0100 (Sat, 15 Aug 2009) 
BRANCH: multipolygon

Patch by Rudi for problems with multipolygons
as listed below.

Problem 3 may be caused by one of the smoothing/slitting filters and so
maybe better solved another way.

Problem 1:
Simple holes in a polygon are rendered correctly, but if the inner polygon
has additional tags then this information is not rendered. In my example
(Chiemsee in Germany) the lake (natural=water) has the role 'outer' and the
islands have the role 'inner' with additional tags (natural=land,
landuse=residential).

Solution:
The points of the inner polygon are no longer deleted.
(According to the wiki the inner polygon shouldn't have tags in the case of
a simple hole, but in reality this is not always true. I remove identical
tags from the inner polygon, so simple holes are still rendered correctly.)

Problem 2:
Multipolygon within a multipolygon. In my example the island has the role
'inner' and also the role 'outer' of another relation (wood inside the
island). Now I have a problem: The order of the processing of the relations
is not determined. If the lake relation is processed first then everything
is ok. But if the island relation is processed first then the polygon of the
island is changed (polygon is extended by the inner ways) and this has a
negative influence on the lake relation. Now we have water within the island
because the lake polygon is extended by the island way that was extended
before.

Solution:
I duplicate the outer way and remove all tags of the original outer way. The
new outer way is changed (adding the inner ways) but this doesn't influence
other relations because they refer to the original outer way. By removing
the tags of the original way it will never be used by the style.

Problem 3:
Small multipolygons are rendered correctly but I have a problem with larger
multipolygons. The inner holes are visible at low zoom levels, but they
disappear if I zoom in. I don't know if this is a problem of the Garmin
software or if this is an effect of a filter in mkgmap.

Solution:
Nodes with identical coordinates (where the outer way is joined with the
inner way) seem to be the reason. I shift two nodes by one unit, now the
multipolygon is displayed correctly if I zoom in.


More information about the mkgmap-dev mailing list