Add GTFS extended route_types#279
Add GTFS extended route_types#279naxxfish wants to merge 2 commits intogoogle:masterfrom naxxfish:gtfs-extended-route-types
Conversation
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
|
Can you explain a bit how those all route types would be useful? There's a lot of service that I don't see being used in GTFS ever. |
|
The Google proposal does provide examples for many of the route types, derived from this (now defunct) BBC page, which in of itself was proposed by TPEG. They are being used by producers, e.g. The original list was derived from the TPEG specification and has been pared down since then. It could be reduced further (to remove more unusual types like "Post Bus Service" or "Aerial Lift Service", however by doing so there would be holes in the sequence which may increase confusion. Renumbering the list would risk overloading existing interpretations of the route_types. Since the proposed extension has been publically available for so long, and datasets have been built that use them, despite the fact that the meaning of these types are relatively well known and supported in many consumers (e.g. Google Transit and , GTFS produced using these values fails validation in many implementations of validators as it is not part of the reference specification. |
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
| | `route_long_name` | Text | **Conditionally Required** | Full name of a route. This name is generally more descriptive than the `route_short_name` and often includes the route's destination or stop. Both `route_short_name` and `route_long_name` may be defined.<br><br>Conditionally Required:<br>- **Required** if `routes.route_short_name` is empty.<br>- Optional otherwise. | | ||
| | `route_desc` | Text | Optional | Description of a route that provides useful, quality information. Do not simply duplicate the name of the route. <hr> _Example: "A" trains operate between Inwood-207 St, Manhattan and Far Rockaway-Mott Avenue, Queens at all times. Also from about 6AM until about midnight, additional "A" trains operate between Inwood-207 St and Lefferts Boulevard (trains typically alternate between Lefferts Blvd and Far Rockaway)._ | | ||
| | `route_type` | Enum | **Required** | Indicates the type of transportation used on a route. Valid options are: <br><br>`0` - Tram, Streetcar, Light rail. Any light rail or street level system within a metropolitan area.<br>`1` - Subway, Metro. Any underground rail system within a metropolitan area.<br>`2` - Rail. Used for intercity or long-distance travel.<br>`3` - Bus. Used for short- and long-distance bus routes.<br>`4` - Ferry. Used for short- and long-distance boat service.<br>`5` - Cable tram. Used for street-level rail cars where the cable runs beneath the vehicle (e.g., cable car in San Francisco).<br>`6` - Aerial lift, suspended cable car (e.g., gondola lift, aerial tramway). Cable transport where cabins, cars, gondolas or open chairs are suspended by means of one or more cables.<br>`7` - Funicular. Any rail system designed for steep inclines.<br>`11` - Trolleybus. Electric buses that draw power from overhead wires using poles.<br>`12` - Monorail. Railway in which the track consists of a single rail or a beam. <br><br>In addition, an extension has been proposed to allow specifying route types using Hierarchical Vehicle Type (HVT) codes from the European TPEG standard. <br><br>`100` - Railway Service<br>`101` - High Speed Rail Service<br>`102` - Long Distance Trains<br>`103` - Inter Regional ail Service<br>`104` - Car Transport Rail Service<br>`105` - Sleeper Rail Service<br>`106` - Regional Rail ervice<br>`107` - Tourist Railway Service<br>`108` - Rail Shuttle (Within Complex)<br>`109` - Suburban Railway<br>`110` - Replacement Rail Service<br>`111` - Special Rail Service<br>`112` - Lorry Transport Rail ervice<br>`113` - All Rail Services<br>`114` - Cross-Country Rail Service<br>`115` - Vehicle Transport Rail ervice<br>`116` - Rack and Pinion Railway<br>`117` - Additional Rail Service<br>`200` - Coach Service<br>`201` - International Coach Service<br>`202` - National Coach Service<br>`203` - Shuttle Coach Service<br>`204` - egional Coach Service<br>`205` - Special Coach Service<br>`206` - Sightseeing Coach Service<br>`207` - Tourist oach Service<br>`208` - Commuter Coach Service<br>`209` - All Coach Services<br>`400` - Urban Railway Service<br>`401` - Metro Service<br>`402` - Underground Service<br>`403` - Urban Railway Service<br>`404` - All rban Railway Services<br>`405` - Monorail<br>`700` - Bus Service<br>`701` - Regional Bus Service<br>`702` - xpress Bus Service<br>`703` - Stopping Bus Service<br>`704` - Local Bus Service<br>`705` - Night Bus Service<br>`706` - Post Bus Service<br>`707` - Special Needs Bus<br>`708` - Mobility Bus Service<br>`709` - - Mobility Bus for Registered Disabled <br>`710` - Sightseeing Bus<br>`711` - Shuttle Bus<br>`712` - School us<br>`713` - School and Public Service Bus<br>`714` - Rail Replacement Bus Service<br>`715` - Demand and esponse Bus Service<br>`716` - All Bus Services<br>`800` - Trolleybus Service<br>`900` - Tram Service<br>`901` - City Tram Service<br>`902` - Local Tram Service<br>`903` - Regional Tram Service<br>`904` - Sightseeing Tram ervice<br>`905` - Shuttle Tram Service<br>`906` - All Tram Services<br>`1000` - Water Transport Service<br>`1100` - Air Service<br>`1200` - Ferry Service<br>`1300` - Aerial Lift Service<br>`1400` - Funicular ervice<br>`1500` - Taxi Service<br>`1501` - Communal Taxi Service<br>`1502` - Water Taxi Service<br>`1503` - ail Taxi Service<br>`1504` - Bike Taxi Service<br>`1505` - Licensed Taxi Service<br>`1506` - Private Hire ervice Vehicle<br>`1507` - All Taxi Services <br>`1700` - Miscellaneous Service<br>`1702` - Horse-drawn Carriage| | ||
| | `route_type` | Enum | **Required** | Indicates the type of transportation used on a route. Valid options are: <br><br>`0` - Tram, Streetcar, Light rail. Any light rail or street level system within a metropolitan area.<br>`1` - Subway, Metro. Any underground rail system within a metropolitan area.<br>`2` - Rail. Used for intercity or long-distance travel.<br>`3` - Bus. Used for short- and long-distance bus routes.<br>`4` - Ferry. Used for short- and long-distance boat service.<br>`5` - Cable tram. Used for street-level rail cars where the cable runs beneath the vehicle (e.g., cable car in San Francisco).<br>`6` - Aerial lift, suspended cable car (e.g., gondola lift, aerial tramway). Cable transport where cabins, cars, gondolas or open chairs are suspended by means of one or more cables.<br>`7` - Funicular. Any rail system designed for steep inclines.<br>`11` - Trolleybus. Electric buses that draw power from overhead wires using poles.<br>`12` - Monorail. Railway in which the track consists of a single rail or a beam. <br><br>In addition, an extension has been proposed to allow specifying several route types using a relevant subset of Hierarchical Vehicle Type (HVT) codes from the European TPEG standard. <br><br>`100` - Railway Service<br>`101` - High Speed Rail Service<br>`102` - Long Distance Trains<br>`103` - Inter Regional ail Service<br>`105` - Sleeper Rail Service<br>`106` - Regional Rail ervice<br>`107` - Tourist Railway Service<br>`108` - Rail Shuttle (Within Complex)<br>`109` - Suburban Railway<br>`200` - Coach Service<br>`201` - International Coach Service<br>`202` - National Coach Service<br>`204` - Regional Coach Service<br>`400` - Urban Railway Service<br>`401` - Metro Service<br>`402` - Underground Service<br>`403` - Urban Railway Service<br>`405` - Monorail<br>`700` - Bus Service<br>`701` - Regional Bus Service<br>`702` - Express Bus Service<br>`704` - Local Bus Service<br>`715` - Demand and Response Bus Service<br>`800` - Trolleybus Service<br>`900` - Tram Service<br>`901` - City Tram Service<br>`902` - Local Tram Service<br>`903` - Regional Tram Service<br>`904` - Sightseeing Tram ervice<br>`905` - Shuttle Tram Service<br>`906` - All Tram Services<br>`1000` - Water Transport Service<br>`1200` - Ferry Service<br>`1300` - Aerial Lift Service<br>`1400` - Funicular Service<br>`1501` - Communal Taxi Service<br>`1700` - Miscellaneous Service<br>`1702` - Horse-drawn Carriage| |
There was a problem hiding this comment.
I don't support these kind of changes. Google Maps is not the exclusive user of these datasets.
There was a problem hiding this comment.
From cursorary observation of a small sample of datasets, these seem to be the more popular ones.
Very happy to revert that commit if these (official but unofficial) extensions are actually in use in the real world.
There was a problem hiding this comment.
I would say, these values should be update to recent TPEG changes, and then use all the TPEG values. It is a hierarchy anyway.
There was a problem hiding this comment.
If it's desirable to synchronise with TPEG2-PTS (TS 21219-13:2020), that seems like a logical course of action. However, I don't personally have access to this specification (it comes at a cost of 178 CHF from the ISO webshop or £260 from the BSI webshop) to know the new values, and as far as I know they aren't publically available in isolation from the standard anywhere. I'm also unsure on the terms of the copyright for that standard and whether it'd be permissible to replicate a part of it in the GTFS specification.
Also, it may not be desirable to simply replicate the TPEG standard list of vehicle types, but actually only a subsection of it that is likely to be useful for data export in GTFS format. The intended uses of the two are different - TPEG is primarily interested in transmission of transport related information for immediate consumer use (e.g. traffic alerts in DAB radios, where it originated) - rather than describing a schedule or changes to it. The types of vehicle represented may not all be relevant to GTFS.
Then again, transit providers may already have systems which use the TPEG codes for use in different areas (e.g. issuing service alerts to broadcasters), so making the two instantly compatible may be beneficial.
Hard for me to know from my viewpoint! Would welcome thoughts from others.
There was a problem hiding this comment.
I think SIRI should be / is going to be updated. Already with a limited scope.
There was a problem hiding this comment.
SIRI modes for the most part seem to be compatible here. The only difference is they don't have numeric values (they've just enums) - so in order to preserve compatibility with providers implementing the defacto Google extension, the original numbers would need to be preserved and any additions to be assigned new numbers.
Also in Swiss data this exists. Specifically differentiation between rail modes are very prominent. |
|
If I may reference @aababilov's (@ Google) thoughts on this matter from #174:
As mentioned, the GTFS-ModesAndNetworks proposal may be a favorable solution as it allows distinction between what a mode is locally called and a stable wikidata identifier describing what it is. This avoids the exhaustive listing proposed in this PR. |
|
A few observations:
Placing the entire list of modes inline in the description of route_type is quite verbose and puts them on par with the original 7 modes. Even if extended mode codes are adopted, I think there is still a clear hierarchy: the original 7 modes are very widely used and much more likely to be handled exhaustively by consumers; the many additional codes are clearly an extension, and consumers are very likely to handle them by mapping them down to a smaller set, or handle a few as special cases. (Some of the original modes like "cable car" might also get second-class support, but the core idea remains.) The reference for all available mode codes should probably be pulled out into a separate section and referenced from the route_type description. It is somewhat appealing to just scrap any exhaustive list of codes, and make modes and networks fully producer-defined as suggested by @scmcca. The GTFS-ModesAndNetworks proposal looks promising, but it might benefit from a few revisions. For example, it seems like producers would be required to define a route_type on every route even when they have also defined a mode. I'm also unclear on why the modes would be tied to an ID in a predetermined database (mobilitydatabase.org or wikidata), as opposed to a URL. URLs are used elsewhere in GTFS, and are themselves globally unique IDs. |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
This pull request has been closed due to inactivity. Pull requests can always be reopened after they have been closed. See the Specification Amendment Process. |
|
Keep open. |
|
@skinkie As defined in article 8 of the Specification Amendment Process, it is up to the advocate (@naxxfish) if they wish to continue the proposal. Article 8 reads:
If you have a counter proposal or wish to advocate this PR yourself, I think this would be easiest done by opening a separate one. |
Proposed by Google https://developers.google.com/transit/gtfs/reference/extended-route-types
Discussed (in 2008) at length here: https://groups.google.com/g/gtfs-changes/c/keT5rTPS7Y0/m/LH4G0R9iCQAJ