-
Notifications
You must be signed in to change notification settings - Fork 31
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
Data structure #30
Comments
Here a first proposal: RouteMaster
RouteVariant
Stop
Some thoughts:
|
Looks generally good I'd say!
If we do this, can we please print a warning to stderr about the missing master relation? |
Yes, of course (as it is already)! I think this would help people to know about this missing piece and maybe go to OSM and put it there. |
I would like to start a quick discussion/question about naming. We have different concepts of routes in OpenStreetMap and GTFS. Sometimes they are not existent or ambiguous. I'm considering to introduce new names for our classes, to be widely understandable and to avoid confusion:
Problems:
That's why I'm suggesting to use ServiceLine, RouteVariant and Trip. And I'd like to ask for your feedback. At some point we probably should ask native speakers (British and American) |
I asked on the OSM mailing list and Jo (Polyglot) suggested:
That looks also very appealing to me. (I updated the table above) |
American friends told me that Line and Itinerary sound awkward to them. So, after some more conversations and back and forth I'm opting now for RouteContainer and RouteVariation (Updated the table). BTW, the different use of the term route between OSM and GTFS seems not to be caused by British vs. American language, rather than OSM historical development of the data structure. First there was just a route, then it was realized a container was needed for it and somebody called it route_master... |
Interesting, the European Transmodel standard actually defines "LINE" as the top container with one or many JOURNEY PATERNS/ROUTEs... We are turning around and around... Maybe you have some good idea. |
I personally prefer Line, Itinerary and Trip, but in the end it doesn't matter all that much and we should rather spend time on improving the code than discussing names forever ;) |
Yes, I agree. Let's use Line and Itinerary. Just thinking more about this and I don't want to loose the idea: We probably want to move |
In PR #36 we saw that the tests for doubled |
When fixing the data structures, maybe this library can be useful: https://glyph.twistedmatrix.com/2016/08/attrs.html |
Looks like a nice library. I also want to try it. Note to my/ourselves: We had issues with the old overpy which was not showing members of route_master relations after querying. But actually if there is no member the |
@xamanu Can I use the above diagram in my State of the Map presentation? I'll also give credit to you. |
@grote Yes, of course! Consider all documentation I write for osm2gtfs to be under CC-BY license, if not stated differently. I'm very happy to hear you are presenting osm2gtfs on SotM Latam. Please give my warm regards to the people who know me. |
Looking at the source code, it seems like you need a config JSON and three |
Yes. We need generic creators (see #33 and #26) and we are going (slowly) to that. (#59) |
Working on the data structure, I noticed, a new data class |
Resolved with accepted PR #99 |
osm2gtfs downloads data from OpenStreetMap (Public Transport Schema version 2) and puts it into transitfeed's structure to generate GTFS.
Currently there is a parallel data structure (mainly living in the classes
RouteMaster
,Route
,Stop
) with some regional touch. We already started some discussion about this in #26, but I think it's worth to discuss this separately.Resuming the past comments on this:
We were considering to use directly transitfeed's (routes, stops and trips objects) instead of a parallel data structure. The downside of this would be that we would make ourselves totally dependent on transitfeed's classes which might change without further notice.
I further think it's not really possible because stops associated to routes (and variants) are connected in transitfeed's objects through the trips. Something osm2gtfs generates at the very end based on stops over routes. So this would just not work, as far as I understand.
Ergo, we need a parallel structure(!?). So, let's think about this and how this would look like.
The text was updated successfully, but these errors were encountered: