fixing-polygons-in-osm icon indicating copy to clipboard operation
fixing-polygons-in-osm copied to clipboard

Fix complex rings?

Open grischard opened this issue 7 years ago • 5 comments

Some mappers find it easier in their editor or intellectually challenging to map touching areas by forming multipolygons with rings split in many pieces.

While mapping with polygon origami isn't an error, these complex MPs are difficult to maintain, which tends to cause errors. The DWG has asked mappers who were doing this on a large scale to stop doing this, and rebuilt some of those polygons.

Could detecting and fixing this kind of polygons be part of this project?

grischard avatar Mar 15 '17 13:03 grischard

This just looks like over-detailed mapping to me. Can you give a rule (that can be automated) that would describe (at least some of) those cases?

joto avatar Mar 15 '17 13:03 joto

It doesn't actually add any detail - if you look at https://www.openstreetmap.org/relation/3177299, this could be one outer and one inner way forming the rings without removing any information.

Having more than one way in a ring isn't necessarily an error - it can be legitimate to cut rings with many nodes, like https://www.openstreetmap.org/relation/1066719

The overpass query I linked above finds only some of the worst examples. An automatable rule would maybe be multipolygons, with rings that contain more than one way, with less than 500 nodes per way in at least two of the ways in that ring?

grischard avatar Mar 15 '17 20:03 grischard

Both relations you mention look reasonable to me. In fact I would argue that splitting them up more could make sense. (Less to download if only working on a part of the multipolygon and re-use of the ways on neighboring mps for instance.) But different people have different ideas here. I don't see how we can fit this into a general rule except that the real extremes (lots of ways with only two nodes in an mp relation or ways all with 2000 nodes) are probably bad.

But even if we decide those extreme cases are not optimal, does it really help to fix them in a large effort? Can't they be fixed whenever a mapper encounters them?

joto avatar Mar 16 '17 08:03 joto

You and I can fix them whenever we encounter them, but these origami polygons intimidate newbies and, in my experience, lead to the kind of errors you've started this project for. Fixing those in a large effort, or at least detecting them, is preventative: many of the very complex MPs I fixed around here had self-intersections or unclosed rings.

If you look at the changeset comments on https://www.openstreetmap.org/relation/3177299's ways, it's clear that they are confusing some mappers: "MPs entwirrt", etc.

grischard avatar Mar 16 '17 12:03 grischard

I think the typical "origami" polygons that we encountered e.g. in Luxembourg had two noticeable properties:

  1. A very high number of ways compared to the total area of the polygon. I think if we computed the number-of-ways : area relation for all multipolygons in OSM (or all where the outer ring is more than 1 way, to exclude the building-with-hole case), then the problematic polygons would likely all be in the top 5%.

  2. Polygons with multiple, closed, outer rings but without any identifying tag on them (i.e. no "name", "ref" or so), so you'd have someone mapping three neigbouring landuse=grass areas as one multipolygon with three outer rings, even though there was nothing they had in common except all being grass.

woodpeck avatar Mar 24 '17 11:03 woodpeck