Public Transport routes searcher - few questions

Hello,
I want to make Web App that will search for best bus routes from point A to point B for my city which isn’t in any kind of that apps like Google Maps or any other that are popular in my country.

My plan is to make GTFS files of schedule of that public transport, also to make these routes in OSM maps, and then export it to .osm.pbf, and use these files in Open Trip Planner.

Do You guys think that’s good idea to make that project in that way as i think? I’m pretty new to OpenStreetMap but i’m determined to make it.
I want to say also that for the begin, I want to make that project with STATIC data from GTFS files, later if everything will work as it should - I will work to make it automatically pick datas from timetable.
Thanks, i hope someone will help me.

You couldn’t do this in London, and it is likely that you can’t do it in most places. Bus routes and timetables tend to be owned by the bus company and it can be difficult to get a licence to use them.

Most bus routes in OSM are the result of actually riding the bus and noting the route, or, at least, deducing it from the bus stops. I think extracting timetables from the bus stops would be stretching things to far, and timetables obtained by riding the buses will almost certainly be incomplete, and unreliable.

Unless you are doing this in an area where the bus company licenses all the necessary information in an OSM compatible way, I would suggest that you do this outside of OSM.

Even if the route information is licensed under ODBL and with attribution requirements that are already met by OSM, this would be a mechanical import, and mechanical imports need to be approved by the local community, and very carefully checked to make sure they don’t duplicate information and don’t replace information with less correct information.

I thought that Traveline data was OGL? A lot of NaPTAN bus stop data’s been imported, and that’s essentially the same source and licence AIUI. The reason you don’t tend to see it in OSM is because it’s a pain to parse rather than anything else (one route for every possible route, including that one that runs only at 22:30 on the first Monday of the month). Does TNDS (Traveling national data set) not include London?

In my area, and from what I’ve seen in many other parts of the world, transit agencies and companies are publishing their route and service information in GTFS (General Transit Feed Specification) files. Since the desire to publish them is to make 3rd party apps know about their service, they generally though not always, have open source compatible licensing.

Were I writing an app that attempted to provide public transport routing, I’d look for a way to use those directly or through an aggregator like Navitia. I would probably only use OSM data for providing a background map.

Transport for London hangs on to its intellectual property rights on bus routes, and time tables. They do provide APIs and they are free, at least for low volume use, but they are intended only for real time use, not for capturing the underlying database.

A lot of people think NapTAN is a good example of an import gone wrong, as it never gets maintained, and many stops get lost or duplicated because people don’t understand about it.

Especially in the suburbs, you can see there must a be a bus route, because of the chain of unconnected NapTAN stops, but no one has actually got round to tracing an actual route, of a real service, through those stops.

I’ve just checked and “Oeffi” (a phone app that I’ve always used for bus routes) has no problems routing between Camden Town and Charing Cross. My recollection is that there were some initial “holdouts” from TNDS initially (London was one, York was another) but that problem went away years ago.

Obviously “accessible by a free third-party phone app” doesn’t necessarily mean “suitably licenced for OSM”, but as n76 says above if you’ve got a GTFS feed of data that changes every day you’d want to use that directly rather than import it to OSM. There might be other reasons to import bus route data to OSM, but providing real-time public transport routing isn’t one of them.

It sounds like the local transport companies don’t publish GTFS information, so you’d need to create the GTFS feeds. That process is sufficiently complicated that you should plan on using a “GTFS Editor”. If the OSM road and pedestrian path network is complete in the public transit areas, OpenTripPlanner will then combine the GTFS feed with OSM data to perform trip planning. Entering route and stops into OSM is optional, but might make sense as you are collecting data to create the GTFS feed.

OSM currently has no way to represent full GTFS timetable informaion.

Iit sounds like exactly what i was going to do. My city is small (around 60k of people) and has around ~15-19 connections of buses that doesn’t drive very often, so i think that i should add that to OSM datas and then export and combine with GTFS on OpenTripPlanner :slight_smile:

I tested OTP with example of data (.osm.pbf + gtfs) for Portland in USA, could You guys help me? It doesn’t show any bus route but only by foot or even nothing.
screen:
https://imgur.com/AKSksDh

For help getting started with OpenTripPlanner, check with the OTP Users forum https://groups.google.com/forum/#!forum/opentripplanner-users . They’re familiar with OSM and should be able to help with getting things going.

There is that open source app called Transportr transportr.grobox.de that grabs data from Navitia navitia.opendatasoft.com/explore/?sort=modified
The guy from Transportr seems to take OSM routes and turn them into GTFS github.com/grote/osm2gtfs
It’s also interesting how the guys from Mapanica map by hand the bus routes from Managua, Nicaragua rutas.mapanica.net/
JungleBus fr.ulule.com/jungle-bus/ seems to be committed to map “by hand” too.