logo separator

[mkgmap-dev] Commit: r1607: I have found that some multipolygons use nested inner polygons.

From svn commit svn at mkgmap.org.uk on Wed Mar 17 08:35:24 GMT 2010

Version 1607 was commited by steve on 2010-03-17 08:35:24 +0000 (Wed, 17 Mar 2010) 

I have found that some multipolygons use nested inner polygons.
Example:
* A forest (outer) with a lake (inner) that has an island (inner) which is not a forest. (example: http://www.openstreetmap.org/browse/relation/331402)

By definition of the multipolygon relation (http://wiki.openstreetmap.org/wiki/Relation:multipolygon) one has to create two mps. But I see that it is a nice simplification lots of mappers are using.

Attached patch handles this situation.
The inner and outer roles are now used as follows:
* the outmost polygon must have role=outer (or role=<empty>)
* all outmost polygons with role=inner are not used (a warning is issued)
* all inside polygons with role=inner use their own tagging
* all inside polygons with role=outer use the mp tagging if available or their own tagging if the mp is not tagged
* all inside polygons with role=<empty> are categorized automatically as outer/inner depending on the nest level
* all inside polygons with role=outer without a direct ambient inner polygon are dropped with a warning message (outer in outer polygon)

Most of the renderers do not support inner in inner polygons but I think it is a very reasonable extension of the multipolygon handling.

This patch also improves the error messages. I haven't seen any more "are not processed due to an unknown reason" messages and I look forward that the community will also not be able to generate any more ... ;-)

v2+3: improves the handling of roles and warning messages in multipolygon.
- A reasonable warning message for nested outer and nested inner polygons is given
- nested inner polygons are processed anyhow

- WanMil


More information about the mkgmap-dev mailing list