Finding operator values from GTFS Sweden 3 static data
Hi,
We are migrating from the regional static GTFS feeds to the aggregated GTFS Sweden 3 static feed. For real-time vehicle positions, however, we still call operator-specific endpoints such as:
/gtfs-rt-sweden/sl/VehiclePositions.pb
/gtfs-rt-sweden/ul/VehiclePositions.pb
/gtfs-rt-sweden/skane/VehiclePositions.pb
The resulting vehicles are therefore associated with operator codes such as sl , ul , and skane.
In the aggregated static feed, routes are connected to agencies through routes.txt and agency.txt , but I cannot find the corresponding Trafiklab operator code in the static GTFS data.
Is there an official way to map an agency_id from GTFS Sweden 3 to the operator code used by the GTFS-RT endpoints?
For example, is there published metadata that maps something like:
agency_id -> sl
agency_id -> ul
agency_id ->skane
Or are consumers expected to maintain an external lookup between agency_id values and Trafiklab’s operator codes?
It would also be useful to know whether this mapping is stable over time and whether a single operator code can correspond to multiple agency_id values?
Följ inlägget
1
följare
What do you need this lookup for? There is no exakt mapping available, this would be a many-to-one relationship as one operator code often includes multiple agency ids. The realtime data is mapped through trip_id/route_id reference in the realtime data --> trip --> route --> agency.
Regards,
Bert
I don’t ”need” this but when using the gtfs regional each stop/geofence is tagged with the operator. Switching to the national ”feed” all stops will be tagged ”sweden3”.
One scenario is a stop in Stockholm SL that ”belongs” to UL.
So there is no way to find out to which ”operator” a stop belongs in the national feeds.
Thanks!
What I wanted is a way to know to what ”operator” a stop belongs. But I don’t ”need” it. I assume that requires me to be able to go from the opaque stop_id to an ”operator”.
Thanks!