Key:gtfs:trip_id

From OpenStreetMap Wiki
Jump to navigation Jump to search
Public-images-osm logo.svg gtfs:trip_id
Description
The exact value of the trip_id column in a GTFS feed. Show/edit corresponding data item.
Group: public transport
Used on these elements
should not be used on nodesshould not be used on waysshould not be used on areasmay be used on relations
Useful combination

One of:

See also
Status: approvedPage for proposal

The key gtfs:trip_id=* is used in public transportation tagging to add the trip_id from the GTFS trips.txt file to a PTv2 type=route relation.

Please, use gtfs:shape_id=* if present in trips.txt or shapes.txt as it better fits.

gtfs:trip_id=* should only be used if the route variant represents only one single trip with only one service_id. Otherwise, please, use gtfs:shape_id=* or gtfs:trip_id:sample=*.

The key is used to find the corresponding trip in a GTFS feed. For this the feed needs to be specified using a feed code suffix (see List of GTFS feeds). For a longer explanation on how to reference a GTFS feed, look at GTFS

Example

Look at the route Bus 10: Ringlijn Nijmegen Centraal Station => Universiteit HAN. It is a relation route so we can find the corresponding trips in trips.txt

Below is an excerpt of that table.

trips.txt
route_id service_id trip_id trip_headsign trip_short_name trip_long_name direction_id shape_id ...
87987 457 177374763 Heyendaal 79 0 1127909
87987 457 177374758 Heyendaal 69 0 1127909
87987 457 177374753 Heyendaal 59 0 1127909

We can refer to one of these using gtfs:trip_id:NL-OVApi=177374763.

But in this case gtfs:trip_id:sample:NL-OVApi=177374763 is preferred because the route has multiple trips.

Even better would be using gtfs:shape_id:NL-OVApi=1127909 since this particular feed has different trip id's between feed versions.

Combinations

gtfs:trip_id=*

PTNA

PTNA represents gtfs:trip_id=* on its pages about GTFS trips and in the network analysis (overview) under the tags summary.

gtfs:trip_id=* is evaluated by PTNA to link from the analysis to the GTFS data if additionally network:guid=*, operator:guid=* or gtfs:feed=* is present (example).
Adding the gtfs:route_id=* does not harm but is not needed as it is derivable from gtfs:trip_id:sample=*