-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Splitting roads can reorder ways incorrectly in a route relation with loops #4876
Comments
Thanks @ockendenjo - this is related to #4589 The fix for that bug might have introduced this one, or it could be a case that iD always got wrong. It's very hard to order the member ways correctly in a relation that loops back over itself, especially when the relation is very large and iD hasn't downloaded all of its members. My guess is that one of those ways inside the moved range was what was split, but iD hadn't downloaded the other parts of the relation - this is why iD joined w473970093 to itself. The best way to address this issue would be to reduce the issue to a minimal condition and write a test case for it in here: |
The ways were already ordered correctly in the relation so ID would not have needed to reorder them. Even if ID got the before/after decision wrong this would probably have been better than reordering all the ways I've also come across a case where splitting a road has caused the stops/platforms in the relation to be reordered. This is presumably a side effect of the roads being re-ordered incorrectly? |
Maybe, but iD would have no way to know that..
In this situation, I think the new way needed to be added twice and in opposite direction, because it's an out-and-back with loops? I think this is a map of around where the issue occurred.
I don't know.. It's really hard to tell what changed between v11 and v16. Can you pin it down to a single changeset? |
I do really want to improve this... Some things to keep in mind:
|
I've had another look at the changesets for the relation mentioned in my original bug report, and the screenshot you posted:
Road splitsGreen sections are the new sections of road that were created. Blue sections are the remains of the original way after it was split bus_route diagram |
With regards to the splitting of ways in PTv2 relations, I think that it is necessary to download the adjacent ways (before and after) in the relation. Linear example
Loop example
|
Hey @ockendenjo there are actually a few loop situations we should test for: When splitting B, the resulting ways could be ordered B1,B2, or B2,B1, or both depending on what the route does. We probably don't need to download the whole route though, if we just assume it's ordered to begin with. |
When addressing this issue it would be wise to keep in mind that some routes still use the roles forward/backward to indicate different paths for the forward and return direction. At least bicycle and mtb routes use this method, but there might be others. This method creates a loop in the route, of which half is used for the forward trip and the other half for the return trip. |
A number of the bus_route relations in Lancaster, UK have recently become invalid.
User:gurglypipe has been modifying the roads in the City Centre and has split the roads in a few places. These are the relevant changesets.
https://www.openstreetmap.org/changeset/56998682
https://www.openstreetmap.org/changeset/56997445
See relation: https://www.openstreetmap.org/relation/6536546
I link to two files:
Relation version 37 - though to be valid
Relation version 39 - after some roads were split using ID
User:gurglypipe report that they have not specifically modified the relation
Using a diff tool on files, several ways have moved order in the relation. This should not happen when roads are split. This relation contains several loops, which might be why the problem has occurred??
The text was updated successfully, but these errors were encountered: