dabreegster / bus_spotting

https://dabreegster.github.io/bus_spotting/
Apache License 2.0
5 stars 0 forks source link

Visualize overlapping routes #11

Open dabreegster opened 2 years ago

dabreegster commented 2 years ago

I'm interested in matching the GTFS route shapes to street network data, but not off-the-shelf valhalla/OSRM implementations necessarily. Collecting some notes...

dabreegster commented 2 years ago

Actually the real problem I'm trying to solve here is in the GTFS network viewer. Screenshot from 2022-07-15 16-48-40 You can't click on red routes here, because usually there's a bunch of routes overlapping each other most of the time.

Inspiration: bottom of https://nbviewer.org/github/python-visualization/folium/blob/main/examples/plugin-PolyLineOffset.ipynb. I I already tried this idea out in another case, with max 4 paths: https://github.com/a-b-street/abstreet/pull/939

And I hacked together the same thing for GTFS routes. It looks... interesting. Has potential.

https://user-images.githubusercontent.com/1664407/179259991-d8457a38-850e-47dc-9425-60fa8babb352.mp4

To do this "for real", some things to figure out:

dabreegster commented 2 years ago

Screenshot from 2022-07-28 13-24-04 Screenshot from 2022-07-28 12-53-53 Sometimes working great, sometimes still getting "bowties" due to weird crossings like Screenshot from 2022-07-28 13-21-00

dabreegster commented 2 years ago

References for how to do map matching: https://github.com/ad-freiburg/pfaedle