Key:gtfs:shape_id

From OpenStreetMap Wiki
Jump to navigation Jump to search
Public-images-osm logo.svg gtfs:shape_id
Description
The exact value of the shape_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:shape_id=* is used in public transportation tagging to add the shape_id from the GTFS shapes.txt file or trips.txt file to a PTv2 type=route relation.

gtfs:shape_id=* is the preferred GTFS id tag for a PTv2 route relation as it directly corresponds with the tagging system. If there is no shape file and no shape_id in the trips.txt file, gtfs:trip_id:sample=* or gtfs:trip_id=* are the alternative solutions.


The key is used to find the corresponding shape 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 the shape of these trips using gtfs:shape_id:NL-OVApi=1127909 since this particular feed has different trip id's between feed versions.

PTNA

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

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