Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix complex rings? #19

Open
grischard opened this issue Mar 15, 2017 · 5 comments
Open

Fix complex rings? #19

grischard opened this issue Mar 15, 2017 · 5 comments

Comments

@grischard
Copy link

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?

@joto
Copy link
Collaborator

joto commented Mar 15, 2017

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?

@grischard
Copy link
Author

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?

@joto
Copy link
Collaborator

joto commented Mar 16, 2017

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?

@grischard
Copy link
Author

grischard commented Mar 16, 2017

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.

@woodpeck
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants