facebook / Rapid

The OpenStreetMap editor driven by open data, AI, and supercharged features
https://rapideditor.org
ISC License
503 stars 92 forks source link

While editing an area of the map the RapiD validator should detect way duplications #212

Open atiannicelli opened 3 years ago

atiannicelli commented 3 years ago

Hoping to have the RapiD editor flag the issues below as errors or warnings so that newly created duplicated ways and overlapping ways segments can be eliminated.

The following conditions Are Higher Priority:

Duplicate nodes in a way ERROR. This would simply check to make sure that no two consecutive nodes in a way are identical. If identical consecutive nodes in a way are found then one of the node entries in the way are removed. (I don't think that iD can create a way like this, but if editing a way with this issue we should fix it.)

Duplicate way (exact) ERROR. This validation would check to see if there are any ways that have the identical set of nodes AND tags. Basically there are two ways that are completely identical. If this is the case then one of the ways should be removed.

Duplicate way (node coordinates) ERROR. This validation would check to see if there are any ways that have the identical set of nodes, but tags are not the same. If this is the case then the ways should be combined.

The following Validations would be nice to have.

Duplicate way section WARNING. This validation would check to see if there is a way that is duplicated by a longer way. If this is the case then the smaller ways might be able to be deleted.

Screen Shot 2021-04-01 at 1 32 02 PM

Duplicate way segment WARNING. This validation would check to see if there are any ways of the same type that have two consecutive nodes that are identical. If this is the case then the segment that overlaps should be highlighted?? One, or both ways should be edited so they don't overlap.

Screen Shot 2021-04-01 at 1 25 43 PM

atiannicelli commented 3 years ago

I have been asked to link to some examples. I have an entire Map Roulette Challenge that was created from an atlas check that scans for such features. The challenge can be found here: https://maproulette.org/browse/challenges/17804

Some specific examples from this challenge are A duplicated crossing way: https://maproulette.org/challenge/17804/task/94282417 Two trail ways that overlap for just a few segments: https://maproulette.org/challenge/17804/task/94273167 A path that overlaps a road: https://maproulette.org/challenge/17804/task/94283307 Two roads that overlap on one segment: https://maproulette.org/challenge/17804/task/94275058

All of the above are bad, but there are currently no warnings from RapiD about them.

atiannicelli commented 3 years ago

Thanks @bhousel and @Bonkles ! The new duplicate way validation added looks like it will deal with the base duplication issue so all of the problems in the issue will be flagged by this PR - That's great. As we discussed I will leave this open in case you want to extend these validations to include the more specific cases above.