[OSM-dev] Tagging of multipolygons with holes within holes
Igor Brejc
igor.brejc at gmail.com
Wed Oct 17 09:21:48 BST 2012
On Wed, Oct 17, 2012 at 10:10 AM, Jochen Topf <jochen at remote.org> wrote:
> 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.
>
If the rule "create an extra MP in that case" exists (and the OSM
validators and renderers follow it), then that should clearly stated in the
Wiki (
http://wiki.openstreetmap.org/wiki/Relation:multipolygon#Island_within_a_hole).
Right now it's just a recommendation, so anyone trying to implement MP
handling has to deal with cases that do not follow that rule.
> It is actually more complicated because the relation also has tags and they
> have to be taken into account.
Let's say the relation wasn't tagged in this case. Or if it was, then the
first way is untagged, which is basically the equivalent case.
> 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. :-)
>
OK, but what to do if you have something like
1. way: the outer way, tagged as forest.
2. way: inner ring, tagged as building
3. way: inner ring, geometrically inside 2nd way, not tagged.
Options:
1. Declare it an invalid.
2. 3rd way becomes a hole in the building.
3. 3rd way becomes a hole in the forest.
> 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. :-)
>
Well I'm forced to deal with the present state of data right now. So it's
more than just interesting to me ;)
Igor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20121017/184b7cca/attachment.html>
More information about the dev
mailing list