On Wed, Oct 17, 2012 at 09:56:23AM +0200, Igor Brejc wrote:
> OK, a couple of things to consider:
> 
>    - What happens if you modify your scenario so that the island is not a
>    forest, but a building instead?

Then you need a different MP relation for the inner part as Frederik has
described in his post.

>    - OSM multipolygon machine-processing requires that you determine the
>    actual roles of rings based on geometry, not on the membership roles. So in
>    fact you then end up with a tree-hierarchy of rings. In that case the
>    island is a ring inside the lake ring. And lake ring is inside of "big
>    forest" ring..

That doesn't change anything. You build the hiearchy to find whats outer and
whats inner and then you flatten the hierarchy by moving all outers that you
found to the top level.

>    - This then becomes important in terms of tagging. Wiki states that a
>    ring becomes a hole (= inner ring) if it is not tagged or is tagged the
>    same as its outer ring. One could then apply that same rule down the tree
>    hierarchy.
> 
> One example: 3 ways
> 1. way: the outer way, tagged as forest.
> 2. way: inner ring, not tagged
> 3. way: inner ring, geometrically inside 2nd way, not tagged.
> 
> How would you interpret the 2nd and the 3rd way?

It is actually more complicated because the relation also has tags and they
have to be taken into account. The 3rd way in your example isn't handled
different from an outer way thats not inside a hole thats not tagged. In
this case the tags of the relation are used. Of course you get into all sorts
of difficult situations here with different tag combinations etc. You'll need
some heuristic to solve this, there is no perfect solution. Osmium does it
roughly like this: Ignore some tags like "source" and "created_by". Then
merge tags of relation and outer ways. Details in the source code. :-)

All these discussions are interesting but shouldn't we spend our time working
on a better solution, ie. real multipolygons in OSM, instead? Just an idea. :-)

Jochen
-- 
Jochen Topf  joc...@remote.org  http://www.remote.org/jochen/  +49-721-388298

_______________________________________________
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev

Reply via email to