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

document extended route_type scheme as GTFS proposal/extension? #115

Open
derhuerst opened this issue Oct 28, 2022 · 5 comments
Open

document extended route_type scheme as GTFS proposal/extension? #115

derhuerst opened this issue Oct 28, 2022 · 5 comments

Comments

@derhuerst
Copy link

When attempting to import Entur's Norway-wide GTFS feed into a DB using gtfs-via-postgres, I noticed that it uses route_type values specified neither a) in the core GTFS spec (both Google's and MobilityData's version) and b) not in Google's extended GTFS route types extension.

For example, it contains this this route:

agency_id route_id route_short_name route_long_name route_type route_desc
ATB:Authority:2` ATB:Line:2_800 800 Trondheim - Brekstad - Kristiansund 1014

When talking to @hannesj and searching for 1014, I came across a proposal from 2008 to adopt the TPEG-PTI values.

The two ID schemes differ in some aspects:

  • The TPEG-PTI proposal's scheme covers water transport in detail, while the Google one doesn't.
  • There's a minor conflicting route_type 1300: "Telecabin Service" in the TPEG-PTI proposal, "Aerial Lift ServiceRoosevelt Island Tramway (US)" in Google' s scheme.
diff --git a/tpeg-pti.txt b/google-extended-route-types.txt
index b0e6b2a..a659672 100644
--- a/tpeg-pti.txt
+++ b/google-extended-route-types.txt
@@ -26,14 +26,12 @@
 207 Tourist Coach Service
 208 Commuter Coach Service
 209 All Coach Services
-300 Suburban Railway Service
 400 Urban Railway Service
 401 Metro Service
 402 Underground Service
 403 Urban Railway Service
 404 All Urban Railway Services
-500 Metro Service
-600 Underground Service
+405 Monorail
 700 Bus Service
 701 Regional Bus Service
 702 Express Bus Service
@@ -60,44 +58,9 @@
 905 Shuttle Tram Service
 906 All Tram Services
 1000 Water Transport Service
-1001 International Car Ferry Service
-1002 National Car Ferry Service
-1003 Regional Car Ferry Service
-1004 Local Car Ferry Service
-1005 International Passenger Ferry Service
-1006 National Passenger Ferry Service
-1007 Regional Passenger Ferry Service
-1008 Local Passenger Ferry Service
-1009 Post Boat Service
-1010 Train Ferry Service
-1011 Road-Link Ferry Service
-1012 Airport-Link Ferry Service
-1013 Car High-Speed Ferry Service
-1014 Passenger High-Speed Ferry Service
-1015 Sightseeing Boat Service
-1016 School Boat
-1017 Cable-Drawn Boat Service
-1018 River Bus Service
-1019 Scheduled Ferry Service
-1020 Shuttle Ferry Service
-1021 All Water Transport Services
 1100 Air Service
-1101 International Air Service
-1102 Domestic Air Service
-1103 Intercontinental Air Service
-1104 Domestic Scheduled Air Service
-1105 Shuttle Air Service
-1106 Intercontinental Charter Air Service
-1107 International Charter Air Service
-1108 Round-Trip Charter Air Service
-1109 Sightseeing Air Service
-1110 Helicopter Air Service
-1111 Domestic Charter Air Service
-1112 Schengen-Area Air Service
-1113 Airship Service
-1114 All Air Services
 1200 Ferry Service
-1300 Telecabin Service
+1300 Aerial Lift ServiceRoosevelt Island Tramway (US)
 1301 Telecabin Service
 1302 Cable Car Service
 1303 Elevator Service
@@ -106,8 +69,6 @@
 1306 Small Telecabin Service
 1307 All Telecabin Services
 1400 Funicular Service
-1401 Funicular Service
-1402 All Funicular Service
 1500 Taxi Service
 1501 Communal Taxi Service
 1502 Water Taxi Service
@@ -116,9 +77,5 @@
 1505 Licensed Taxi Service
 1506 Private Hire Service Vehicle
 1507 All Taxi Services
-1600 Self Drive
-1601 Hire Car
-1602 Hire Van
-1603 Hire Motorbike
-1604 Hire Cycle
-1605 All Self-Drive Vehicles
+1700 Miscellaneous Service
+1702 Horse-drawn Carriage

Which scheme does Entur intend to use? The TPEG-PTI one, the Google one, or a custom combination of both?

@vpaturet
Copy link
Contributor

vpaturet commented Oct 28, 2022

We use a custom combination of both.
We map for example the NeTEx vehicle mode "lift" to "telecabin service" (1300, TPEG-PTI), and the NeTEx vehicle mode "other" to "miscellaneous Service" (1700, Google)

@derhuerst
Copy link
Author

I think it would be great do document the ID scheme you're using! Entur seems to be a significant player in the GTFS-* and open mobility space, so having this written down as an extension, with Entur's name behind it, would help others not to make up (more) ad-hoc ID schemes, but just re-use Entur's.

Or, a more ambitious path forward might be to agree on an ID scheme that combines Google's IDs with the TPEG-PTI ones. 🚀

@vpaturet
Copy link
Contributor

vpaturet commented Nov 4, 2022

A first step would be to document here the mapping we use, to make it more visible. It is currently buried deep in the code:

ROUTE_TYPE_FOR_TRANSPORT_MODE_AND_SUB_MODE = new HashMap<>();

@vpaturet
Copy link
Contributor

Documented here: https://github.com/entur/netex-gtfs-converter-java#route-type-mapping

@derhuerst
Copy link
Author

derhuerst commented Nov 16, 2022

Thanks, that already helps a lot!

As I explained, this depends on how much you want (and have time) to contribute to the GTFS ecosystem, but having this as a linkable extension, maybe a separate README.md or a separate repo would also other GTFS/NeTex users to says they're using it too.

@derhuerst derhuerst changed the title which extended route_type proposal/spec does this follow? document extended route_type scheme as proposal/spec? Nov 16, 2022
@derhuerst derhuerst changed the title document extended route_type scheme as proposal/spec? document extended route_type scheme as proposal/extension? Nov 16, 2022
@derhuerst derhuerst changed the title document extended route_type scheme as proposal/extension? document extended route_type scheme as GTFS proposal/extension? Nov 16, 2022
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

2 participants