osmlab / fixing-polygons-in-osm

Fixing (multi)polygons in OpenStreetMap
25 stars 4 forks source link

Double area declaration #26

Closed wolfbert closed 7 years ago

wolfbert commented 7 years ago

I've come across a multipolygon with building=yes, where the outer way is additionally tagged with landuse=military. This creates the barracks and overlays them in one go.

Surprisingly, this is rendered correctly in Mapnik, but is it ok to do it this way?

wolfbert commented 7 years ago

And there are other cases, which are relevant for the old-style multipolygon correction effort as well, e.g.:

multipolygon with building=school + amenity=school

If amenity is set on the relation, the school grounds will be identical with the building outline; if set on the outer way, the grounds will include the inner sections (e.g. the school yard). This means that the amenity tag and everything connected to it (e.g. school name and website) must not be moved to the relation. It gets more complicated, as some mappers aren't aware of the difference in the first place, and the tagging may be incorrect as it is (i.e. only the building was tagged, without consideration of the grounds).

I believe that we need clarification on which area tags may go on the outer way of a multipolygon, and at the very least, to rule out conflicts. E.g. I found a couple of multipolygons with landuse=residential and some outer ways tagged with landuse=farmyard (rendered as intended).

joto commented 7 years ago

Generally the rule is really simple once we get rid of the old-style multipolygons: Tags on the relation are for the whole multipolygon, tags on ways only for the ways, this includes tags on closed ways that might or might not be polygons in their own right depending on their tags. It is up to the mapper to decide whether it makes sense to do this in each particular case, and there are, of course, many ways of getting this wrong.

But generally it is okay to tag the relation and the outer or inner ways. Here are some examples:

In each case we simply "take apart" the objects in our mind and think whether each object "would work for itself". But the mapper has to decide whether they want to do this, or some other tagging might be more appropriate. This tagging on the relation and on the ways can get confusing for more complex objects, so I would only use it for simpler cases.

There is a problem in this transition phase where totally correct tags according to the new style interpretation might be interpreted by some software according to the old style interpretation. But I don't think we can do anything specially here. Just get through this and get this fixed in the long run.

wolfbert commented 7 years ago

Tags on the relation are for the whole multipolygon, tags on ways only for the ways, this includes tags on closed ways that might or might not be polygons in their own right depending on their tags.

Thanks, that's what I was looking for (and wasn't fully aware of).

This relates to my other issue #22 Overlapping Areas. The way I understand it, an overlap implies an includes/is-part-of relationship (i.e. grass is part of the golf course), while a multipolygon implies an is-disjunct-from relationship (bunker is different from grass). Tagged outer ways would then establish a surrounding/including relationship with the content of the multipolygon. This excludes quite a few combinations which are contradictory or just don't make sense.

joto commented 7 years ago

I don't see an overlap as "includes/is-part-of relationship". Those objects just happen to cover the same area. They might have something to do with each other or not.

wolfbert commented 7 years ago

Agreed, that's already interpretation of the data. It does help, however, to decide whether a multipolygon is required, or as you expressed it,

whether each object "would work for itself"

A golf course with the grass cut out wouldn't work, and neither would a lake with the island mapped on top.