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

Merging ways may result in duplicate relation membership #8167

Open
DujaOSM opened this issue Nov 5, 2020 · 2 comments
Open

Merging ways may result in duplicate relation membership #8167

DujaOSM opened this issue Nov 5, 2020 · 2 comments

Comments

@DujaOSM
Copy link

DujaOSM commented Nov 5, 2020

When ways being merged participate in the same relation but with different roles, iD will happily duplicate the relation membership in the combined way, keeping the roles intact:

  1. Create a way A, and add it to a (for example) multipolygon M with no role
  2. From A's endpoint, create a way B, and add it to M with role "outer"
  3. Shift-Select A and B and [C]ombine them.

As a result, the combined way participates in M twice, once as "outer" and once with no role. Similar will happen of one is outer and the other inner, or if the relation is a route.

While there's no hard prohibition against duplicate relation membership, this is very rarely needed, and usually inadvertent (for multipolygons in particular, I don't think it's ever valid). The above operation results in an invalid multipolygon which does not render in Carto, and iD currently does not provide validation against such situation.

Suggested solution:

  1. When merging such ways and there is no role conflict, add it to a relation once, with the provided role
  2. If there is a role conflict, prevent merging (similar as with tag conflicts)

As a bonus, add a warning against any duplicate relation membership (sometimes valid in route relations, but then mapper can ignore the warning).

@DujaOSM
Copy link
Author

DujaOSM commented Mar 1, 2021

May I gently ping this? It seems to have slipped through the cracks. Now that it's possible to multi-select ways to add to relations, the problem is even more pronounced -- if I had already added a way to a relation, it's now quite easy to inadvertently re-add it.

@sevku
Copy link

sevku commented Jan 4, 2022

noticed the same issue 👍

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

No branches or pull requests

2 participants