Modify

Opened 3 years ago

Closed 2 months ago

Last modified 8 weeks ago

#21856 closed defect (fixed)

[PATCH] Split way: Wrong position of new member in PTv2 relation splitting a loop

Reported by: skyper Owned by: team
Priority: major Milestone: 24.08
Component: Core Version: latest
Keywords: template_report split way route relation order member loop Cc:

Description

What steps will reproduce the problem?

  1. Have an ordered PTv2 relation containing a small loop, see ptv2_relation_loop_split.osm.xz
  2. Split the loop (at the node Split)

What is the expected result?

The new member is added at the correct position.

What happens instead?

The new member is added at the wrong position leading to a gap.

Please provide any additional information below. Attach a screenshot if possible.

Similar to #19288 and not new, but I stumbled over it again.
It does not matter which of the two parts keeps the existing OSM id.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2022-02-10 22:03:15 +0100 (Thu, 10 Feb 2022)
Revision:18379
Build-Date:2022-02-11 02:31:13
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18379 en) Linux Debian GNU/Linux 11 (bullseye)
Java version: 17.0.2+8-Debian-1deb11u1, Debian, OpenJDK 64-Bit Server VM

Attachments (3)

ptv2_relation_loop_split.osm.xz (3.0 KB ) - added by skyper 3 years ago.
example file
21856.patch (12.2 KB ) - added by taylor.smock 2 years ago.
ptv2_relation_loop_split2.osm.xz (2.8 KB ) - added by skyper 2 years ago.
second example (not fixed)

Download all attachments as: .zip

Change History (40)

by skyper, 3 years ago

example file

comment:1 by skyper, 2 years ago

comment:2 by skyper, 2 years ago

Priority: normalmajor

comment:3 by taylor.smock, 2 years ago

#19217/#18018 are also similar.

comment:4 by skyper, 2 years ago

At least for PTv2 #19534 would be really helpful in general and could warn the users about the current problems with loops.

by taylor.smock, 2 years ago

Attachment: 21856.patch added

comment:5 by taylor.smock, 2 years ago

Milestone: 22.08
Summary: Split way: Wrong position of new member in PTv2 relation splitting a loop[PATCH] Split way: Wrong position of new member in PTv2 relation splitting a loop

@skyper: I believe I've got a patch for the problem. I'm going to check and see if it fixes any of the other tickets.

EDIT:

Didn't fix:

I might see about using RelationSorter to sort the new member instead of trying to guess. But attachment:21856.patch does fix the problem for this ticket.

Last edited 2 years ago by taylor.smock (previous) (diff)

comment:6 by taylor.smock, 2 years ago

Resolution: fixed
Status: newclosed

In 18539/josm:

Fix #21856: Split way: Wrong position of new member in PTv2 relation splitting a loop

by skyper, 2 years ago

second example (not fixed)

in reply to:  1 comment:7 by skyper, 2 years ago

Resolution: fixed
Status: closedreopened

The first example is fixed but my situation of comment 1 is still not working

Please find the second example attached and split at the nodes named "Split". Problem is still the order of the last way of the loop, which is in this case twice the identical way. Note, if you change the way direction everything works fine.

Last edited 2 years ago by skyper (previous) (diff)

comment:8 by taylor.smock, 2 years ago

Using RelationSorter is probably going to have to be the fix. That way we aren't trying to do the same thing in different places.

comment:9 by taylor.smock, 2 years ago

Milestone: 22.0822.09

comment:10 by taylor.smock, 2 years ago

Milestone: 22.0922.10

comment:11 by taylor.smock, 2 years ago

Milestone: 22.1022.11

comment:12 by taylor.smock, 22 months ago

Milestone: 22.1122.12

Milestone renamed

comment:13 by taylor.smock, 22 months ago

Milestone: 22.1223.01

Ticket retargeted after milestone closed

comment:14 by taylor.smock, 21 months ago

Milestone: 23.0123.02

Ticket retargeted after milestone closed

comment:15 by taylor.smock, 20 months ago

Milestone: 23.0223.03

Ticket retargeted after milestone closed

comment:16 by taylor.smock, 19 months ago

Milestone: 23.0323.04

Ticket retargeted after milestone closed

comment:17 by taylor.smock, 18 months ago

Milestone: 23.0423.05

Ticket retargeted after milestone closed

comment:18 by taylor.smock, 17 months ago

Milestone: 23.0523.06

Ticket retargeted after milestone closed

comment:19 by taylor.smock, 15 months ago

Milestone: 23.0623.07

Ticket retargeted after milestone closed

comment:20 by taylor.smock, 15 months ago

Milestone: 23.0723.08

Ticket retargeted after milestone closed

comment:21 by taylor.smock, 14 months ago

Milestone: 23.0823.09

Ticket retargeted after milestone closed

comment:22 by taylor.smock, 13 months ago

Milestone: 23.0923.10

Ticket retargeted after milestone deleted

comment:23 by taylor.smock, 11 months ago

Milestone: 23.1023.11

Ticket retargeted after milestone deleted

comment:24 by taylor.smock, 10 months ago

Milestone: 23.11

Ticket retargeted after milestone closed

comment:25 by taylor.smock, 10 months ago

Milestone: 23.12

comment:26 by taylor.smock, 9 months ago

Milestone: 23.1224.01

Ticket retargeted after milestone closed

comment:27 by taylor.smock, 8 months ago

Milestone: 24.0124.02

Ticket retargeted after milestone closed

comment:28 by taylor.smock, 7 months ago

Milestone: 24.0224.03

Ticket retargeted after milestone closed

comment:29 by taylor.smock, 6 months ago

Milestone: 24.0324.04

Ticket retargeted after milestone closed

comment:30 by taylor.smock, 5 months ago

Milestone: 24.0424.05

Ticket retargeted after milestone closed

comment:31 by taylor.smock, 4 months ago

Milestone: 24.0524.06

Ticket retargeted after milestone closed

comment:32 by stoecker, 3 months ago

Milestone: 24.0624.07

Milestone closed.

comment:33 by taylor.smock, 2 months ago

Milestone: 24.0724.08

Ticket retargeted after milestone closed

comment:34 by taylor.smock, 2 months ago

Resolution: fixed
Status: reopenedclosed

In 19197/josm:

Fix #21856: Split way: Wrong position of new member in PTv2 relation splitting a loop

comment:35 by aceman, 2 months ago

"Ad ways in a sorted manner" should be "Add ways in a sorted manner".

Also please do not implement any automatic/hidden member sorting (possibly mentioned in comment 8) as that may break correct order of members at other place that the user is touching. iD is notorious for constantly damaging valid route relations with loops.

comment:36 by stoecker, 2 months ago

In 19199/josm:

see #21856, fix typo

in reply to:  35 comment:37 by taylor.smock, 8 weeks ago

Replying to aceman:

"Ad ways in a sorted manner" should be "Add ways in a sorted manner".

Oops. I guess I was "advertising ways in a sorted manner." Which still kind of makes sense, but add is what I meant.

Also please do not implement any automatic/hidden member sorting (possibly mentioned in comment 8) as that may break correct order of members at other place that the user is touching. iD is notorious for constantly damaging valid route relations with loops.

The only thing I was interested in doing with that was sorting new members (from the split). The previous behavior was not well-defined (IIRC, prior to r18539, the members were out-of-order most of the time for the cases discussed in this ticket).

In any case, it turns out that RelationSorter doesn't (currently) have the concept of locking the first/last members, so it doesn't work for this particular ticket (it has a tendency to make short loops in cases like this).

Last edited 8 weeks ago by taylor.smock (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.