logo separator

[mkgmap-dev] [PATCH v1] Multipolygon: Allow nested inner polygons

From WanMil wmgcnfg at web.de on Mon Mar 1 22:28:23 GMT 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 ... ;-)

WanMil

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mp_rolehandling_v1.patch
Url: http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20100301/6ce26e43/attachment.pl 


More information about the mkgmap-dev mailing list