Opened 6 years ago

Last modified 6 years ago

#18596 closed defect

[PATCH] Fix relation ordering after split-way — at Initial Version

Reported by: JeroenHoek Owned by: team
Priority: normal Milestone: 20.03
Component: Core Version: latest
Keywords: Cc: Larry0ua, taylor.smock

Description

In some cases the split-way command failed to detect the direction of ways part of a relation by breaking too soon from the loop that inspects relation members. This commit fixes this.

Additionally, a warning is shown to the user if by splitting the way a relation may have been damaged. This warning is raised when all of these requirements are met:

  • the relation concerned is a route or multipolygon,
  • has more than one member,
  • does not have all of its members downloaded, and
  • the direction could not be determined from the available members.

Background

This bug causes routes for public transport, hiking, and cycling to break when edits are performed on small parts of the map — e.g., when a mapper is working on details in a neighbourhood. It is common for such relations to have only a few members downloaded.

The split way command tries to determine the order of the new parts by looking at the available members, but due to a bug in the detection loop this can fail even when at least two connected members are available. This specific bug is hit when a way is split that is at one end of the downloaded members: in that case there is a 50% chance (depending on the position of the member in the relation) that the split will place the new parts in the wrong order. This commit solves this by not breaking from the detection loop too soon.

Change History (1)

by JeroenHoek, 6 years ago

Attachment: warning.png added
Note: See TracTickets for help on using tickets.