Modify

Opened 6 years ago

Last modified 4 months ago

#11373 new enhancement

Sorting within stop/platform members of type=route relations

Reported by: simon04 Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: sort relation route public-transport-v2 Cc: Weide, skyper

Description

Public transport members of role stop/platform are put in front of other members as of #10973.

In addition, those members should be grouped in pairs of stop + platform by their name and/or stop_area membership.

See also #10972.

Attachments (0)

Change History (5)

comment:1 Changed 21 months ago by skyper

Was this implemented ?

comment:2 Changed 12 months ago by skyper

Keywords: sort relation public-transport-v2 added; sorting removed

comment:3 in reply to:  1 Changed 4 months ago by michael2402

Replying to skyper:

Was this implemented ?

The pt_assist plugin can do something similar. It is not in core.

Should this be a core functionality or should it stay as plugin?

comment:4 Changed 4 months ago by skyper

Keywords: route added

I would say, if core supports sorting members, it should do it properly without any plugin. Sorting works much better now and the order of stops is the only remaining small issue.

comment:5 in reply to:  4 Changed 4 months ago by michael2402

Replying to skyper:

I would say, if core supports sorting members, it should do it properly without any plugin. Sorting works much better now and the order of stops is the only remaining small issue.

The logic to sort stops is more complex. We need to find the closest position on the route of each stop.

I am currently using a binary search along the segments and then do a normal min() over all segments in the bounds to find that position:

https://github.com/JOSM/pt_assistant/blob/a25fc890878179e7eaf08fceb1ab09daf28c2760/src/main/java/org/openstreetmap/josm/plugins/pt_assistant/gui/routing/RouteTraverser.java#L86

The algorithm cannot handle stops that are next to the rout twice (e.g. because the route has a loop) - still have to find a nice solution there.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to simon04
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.