Modify

Opened 13 years ago

Last modified 3 years ago

#6920 new defect

sorting error relations of participants

Reported by: ErshKUS Owned by: team
Priority: normal Milestone:
Component: Core Version: latest
Keywords: sort, relation, route, relation-sorting, dual-way Cc:

Description (last modified by Larry0ua)

sorting error relations of participants.
http://www.openstreetmap.org/browse/relation/32929

example attached

Attachments (1)

relations_sort.osm (12.0 KB ) - added by Larry0ua 12 years ago.
updated version which is more valid I hope

Download all attachments as: .zip

Change History (20)

comment:1 by stoecker, 13 years ago

Owner: changed from team to ErshKUS
Status: newneedinfo

Please be more verbose about what you want. Currently your report isn't understandable.

comment:2 by ErshKUS, 13 years ago

Status: needinfonew

Open this relation (in "editor relations"), press "sort" in participants and incorrectly sorted participants.

comment:3 by simon04, 13 years ago

We had another ticket which stated that Sort the relation members does not work as expected, i.e., producing an unsorted list. Repeated executions of this sorting change the order every time (the result is not stable). Unfortunately, I couldn't find that other ticket now.

comment:4 by skyper, 13 years ago

Did you mean #6732.
I noticed JOSM not working correctly with loops but have to look for an example.

It is always much easier with an example as .osm file as objects are changing on the OSM server.

in reply to:  4 comment:5 by simon04, 13 years ago

Replying to skyper:

Did you mean #6732.

I think so, yes.

It is always much easier with an example as .osm file as objects are changing on the OSM server.

I agree. Therefore, I created #6804.

Last edited 13 years ago by simon04 (previous) (diff)

comment:6 by Larry0ua, 12 years ago

Description: modified (diff)

Example attached - top 2 routes are not sorted correctly, and 3 last - sorted.

by Larry0ua, 12 years ago

Attachment: relations_sort.osm added

updated version which is more valid I hope

comment:7 by Larry0ua, 12 years ago

I checked file once again - now there are relations that can be sorted with some sequence of members, but are broken after pressing "sort" button.

However I do not know if previous version should be sorted or not - that was like current but without connected ends of left and right side (was =o=, not -==o==- )

comment:8 by Larry0ua, 12 years ago

Description: modified (diff)
Owner: changed from ErshKUS to skyper

comment:9 by skyper, 12 years ago

Owner: changed from skyper to team

in reply to:  7 comment:10 by skyper, 12 years ago

Replying to Larry0ua:

I checked file once again - now there are relations that can be sorted with some sequence of members, but are broken after pressing "sort" button.

However I do not know if previous version should be sorted or not - that was like current but without connected ends of left and right side (was =o=, not -==o==- )

I tend to split up the roundabout in 1) and 2), if the route does not follow all segments of the roundabout.

I also always add role:forward to roundabouts.

comment:11 by Larry0ua, 12 years ago

Yes, when I split roundabout it works OK, but current sorting code tends to work with such cases, isn't it?

By the way, adding role forward to roundabout does not make any sense to that sorting code - it checks if line is roundabout, and if not - if that is oneway forward/backward or not (RelationNodeMap.java:86-100)

in reply to:  11 comment:12 by skyper, 12 years ago

Replying to Larry0ua:

Yes, when I split roundabout it works OK, but current sorting code tends to work with such cases, isn't it?

Have not much time right now !
It should as there might be cases where the whole roundabount is part of the route.

There was a case with routes taking a loop and then continuing which did not work if part of the loop is used in both directions (A):

A:  |                        B:  |
    ^                            ^
    |    _                       | ___
    |___| |                      |/   \
    |   |_|                      |\___/
    |                            |
    ^                            ^
    |                            |

but I also did not check if it works if the loop consists of ways only used in on direction (B).

By the way, adding role forward to roundabout does not make any sense to that sorting code - it checks if line is roundabout, and if not - if that is oneway forward/backward or not (RelationNodeMap.java:86-100)

Was only a generell suggestion. Maybe some other code will use it.

comment:13 by skyper, 12 years ago

Ticket #6983 has been marked as a duplicate of this ticket.

comment:14 by simon04, 5 years ago

Keywords: public-transport-v1 relation-sorting added

comment:15 by skyper, 4 years ago

Keywords: route dual-way added; public-transport-v1 removed

comment:16 by skyper, 4 years ago

Ticket #17897 has been marked as a duplicate of this ticket.

comment:17 by skyper, 4 years ago

Still reproducible:

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-04-06 02:17:07 +0200 (Mon, 06 Apr 2020)
Revision:16239
Build-Date:2020-04-06 00:18:43
URL:https://josm.openstreetmap.de/svn/trunk

comment:18 by skyper, 4 years ago

See route 66 in josm_18018_example_v4.osm.bz2 for another example.

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

in reply to:  18 comment:19 by skyper, 3 years ago

Replying to skyper:

See route 66 in josm_18018_example_v4.osm.bz2 for another example.

Strange, if I select all members and reverse the order, sorting works. Might be related to #20605.
Similar happens with the simple examples in relations_sort.osm.

Still able to reproduce the problems, especially, the corruption of correctly order examples with roundabouts as closed ways.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2021-03-21 23:33:16 +0100 (Sun, 21 Mar 2021)
Revision:17634
Build-Date:2021-03-22 02:30:57
URL:https://josm.openstreetmap.de/svn/trunk

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to ErshKUS.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


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