Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public transport #625

Open
julianfairfax opened this issue Aug 21, 2022 · 6 comments
Open

Public transport #625

julianfairfax opened this issue Aug 21, 2022 · 6 comments

Comments

@julianfairfax
Copy link

It would be nice to have public transport routing in Pure Maps. Possibly https://github.com/GNOME/gnome-maps/tree/main/src/transitplugins could be used? This is supposedly what's used in GNOME Maps, which supports public transport routing in Switzerland using transport.opendata.ch (and surely more through other sources)

@rinigus
Copy link
Owner

rinigus commented Aug 21, 2022

Some other notable software:

  • KTrip
  • Reisplanner SFOS
  • Farhplan SFOS

@Talkless
Copy link

From OSM wiki (https://wiki.openstreetmap.org/wiki/Public_transport/Tools):

osm2gtfs - source is a script to turn OpenStreetMap data and schedule information into GTFS, which can be widely used, like in OpenTripPlanner or in the mobile application Transportr.

So there's tools to gather public transport information from OSM and used as a layer of some sort?

That Transportr looks pretty cool, and it's available on F-Droid: https://transportr.app/

@rinigus
Copy link
Owner

rinigus commented Oct 25, 2022

I'd suggest to look into Valhalla, router used by OSM Scout Server and Stadia. Before it was possible to import whole dataset, but later I had issues with downloading it. So, someone has to figure out how we can add that to Valhalla. Internally, it should support public transport.

@bwildenhain
Copy link

bwildenhain commented Aug 7, 2023

One of our students, @lhaenschke, is currently integrating public transport support using KPublicTransport (the library used by KTrip) into his version of PureMaps, it's still WIP, but it can already be used to search for connections from nearby train stations (bus stations will be handled in the future), see master...lhaenschke:pure-maps:master if you are interested.

@rinigus Do you think such an approach could be integrated after some polishing?

@rinigus
Copy link
Owner

rinigus commented Aug 8, 2023

I am very happy that someone is working on Pure Maps - haven't had time for a while to do it.

I have looked into KPublicTransport integratrion as well and was thinking on how to do that. From the quick look into your code, some feedback:

  • indeed, KPublicTransport is C++ lib, so we will need some kind of C++ API provided to the rest of Pure Maps. In this respect, org.puremaps.TrainConnection is a correct approach
  • KPublicTransport is more generic than train connections router. We should find more generic name for it and not use "Train" in the classes/vars.
  • In principle, it is a router. So, all code should comply with router API. It is a complicated one, as many parameters can be given and alternatives are possible. But it is possible to handle via router API as well. For start, let's set that you cannot automatically reroute and only manual rerouting is supported. If there is a flag missing for it, we would have to add that back
  • When I state that "all code" should go under router, we would have to think about C++ bits. maybe those should stay in the main tree for simplicity.

I think it is mainly code moving and thinking it through on complying with router API. Maybe it is already, but I just didn't notice it.

Hopefully this helps

@magdesign
Copy link

The fork of @lhaenschke looks quite active. Would be nice to get more infos since issue/discussion is disabled on the fork.

Maybe this project is also of interest: https://transitous.org/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants