Skip to content

FTA GTFS identifiers

Teemu Peltonen edited this page Apr 11, 2017 · 1 revision

Agency

Different datasources which are imported and included in FTA’s national GTFS dataset contain duplicate entries for the same agencies. These duplicates are automatically removed so that only one unique instance of agency information exists in the final dataset. As the same agency could have different url or contact information depending on the type of service, the dataset has multiple agency.txt rows for the same agency. Because of this processing, agency_id’s are not preserved from the source dataset. Agency_id’s in the national GTFS dataset are automatically generated technical id’s and they are not permanent.

Route

Currently route_id’s from the data sources are not preserved. Several data sources are provided in a deprecated format that does not contain real route-level information and therefore this information must be generated separately for those sources. We are planning implementing removal of duplicate entries in routes.txt but this is not yet implemented. During this develoement we are planning to preserv original data source route_id when applicable, unfortunately this does not fit well with the removal of duplicate entries and route_id’s can’t be preserved in all cases.

Trip

Trip_id’s are preserved from the datasource using technical datasource id as a prefix. Depending on the datasource, this trip_id changes from time to time, some source systems change the trip_id when updating trip in question. List of datasource prefixes:

prefix datasource
2 HSL
3 Tampere
4 VR
7 Kuopio
8 Mikkeli (Waltti)
9 Joensuu (Waltti)
10 Lappeenranta (Waltti)
11 Kotka (Waltti)
12 Vaasa (Waltti)
13 Hämeenlinna (Waltti)
14 Turku
15 Kouvola (Waltti)
16 Kajaani (Waltti)
17 Lahti
18 Sastamala
19 POPELY (Waltti)
20 POSELY Iisalmi (Waltti)
21 POSELY Joensuu (Waltti)
22 POSELY Kuopio (Waltti)
23 POSELY Mikkeli (Waltti)
30281 Finavia
79654 VALLU
79655 VALLU
79656 VALLU
79657 RAE
160375 Oulu
161546 Jyväskylä

Stop

The principle is that national stop database Digiroad is used as a base information for stops.txt. stop_id’s without any prefix (separated by “_”) are references to Digiroad (http://www.liikennevirasto.fi/web/en/open-data/digiroad/data/bus-stop-data) database primary id. This id can be considered static and changes only if there is significant changes to the actual bus stop. Stop_id’s with prefix are preserved from the datasource according the same technical datasource id’s as was the case with trips.