Hacker News new | ask | show | jobs
by denysvitali 691 days ago
Does this mean that the routing will happen on the app? This might be a bit resource intensive, but great feature (especially since it will work offline!)
3 comments

I don't think routing is that resource intensive, especially in transit setting where there are set number of stops (nodes) and the graph is fairly static - we can do tons of preprocessing and then routing queries would have minimal computational overhead.
I did implement an A* routing "offline" routing algorithm based on GTFS data + walking paths (OptiTravel) and built a GTFS server (to easily serve the data, do geospatial queries, ...) a few years ago. Granted that this was a university project, for some cities the calculation was rather intensive (e.g: London). I might be wrong though.

[1]: https://github.com/denysvitali/optitravel

[2]: https://github.com/denysvitali/gtfs-server

Cool projects! I actually had a look at you gtfs-server, to use Rust for processing GTFS files. Processing GTFS (basically large zipped text files) is quite resource intensive indeed, especially if you want to do it for the whole planet. What would you do differently now?
It is. Especially to do multimodal routing offline.

https://github.com/motis-project/motis/issues/423

Thanks for sharing the link! Multimodal routing definitely changes the game, Imma go through the issue.
I believe the answer should be on this big issue https://github.com/organicmaps/organicmaps/issues/5331
It is definitely resource intensive, but not as much as you would expect. Especially considering the fact that the route only gets calculated once and most modern phones are pretty fast, it won’t really drain your battery.
Context: just benchmarked it with across-the-US routes and it seems fine
As long as you just simulate transit, without the complexity of walking, cycling, driving to the station.