MKuranowski / pyroutelib3

Simple routing over OpenStreetMap data
https://pyroutelib3.readthedocs.io/
GNU General Public License v3.0
79 stars 24 forks source link

Feature Request - Render Route Line on the Right Side of Non-One-Way Roads #33

Closed DomeQdev closed 1 year ago

DomeQdev commented 1 year ago

I would like to request a new feature that allows the rendering of route lines on the right side of non-one-way roads. This feature would help resolve the issue of overlapping route lines when a bus, for example, travels along the same road segment multiple times. image

This is how Szczecin handles buses going multiple times along the same road: image

MKuranowski commented 1 year ago

Good luck with that.

pyroutelib3 doesn't render anything. pyroutelib3 just takes a graph (or creates one from OSM data) and returns a list of nodes of a cheapest path between two nodes.

Also, pyroutelib3 is country-agnostic, and "side of the road" depends on whether a particular region drives on the left or on the right. And even that is not enough, there are streets in some countries (particularly Brasil) which just drive on the opposite side: https://www.openstreetmap.org/way/93268229

This is a problem for the application using pyroutelib3, not pyroutelib3 itself.


And a note for WarsawGTFS, cause I'm assuming that's the use case here. GTFS solves overlapping shapes with shape_dist_traveled. Also, shape generation is already very time-consuming and trying to figure out overlapping segments and shifting them would increase the complexity even further, with a very small impact. That's simply not worth it.