Opened 10 years ago
Last modified 4 years 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 |
Attachments (0)
Change History (5)
follow-up: 3 comment:1 by , 5 years ago
comment:2 by , 5 years ago
Keywords: | sort relation public-transport-v2 added; sorting removed |
---|
comment:3 by , 4 years ago
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?
follow-up: 5 comment:4 by , 4 years ago
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 by , 4 years ago
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:
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.
Was this implemented ?