Key:gtfs:stop_code

From OpenStreetMap Wiki
Jump to navigation Jump to search
Public-images-osm logo.svg gtfs:stop_code
Description
The exact value of stop_code column in a GTFS feed. Show/edit corresponding data item.
Group: public transport
Used on these elements
may be used on nodesmay be used on waysmay be used on areas (and multipolygon relations)may be used on relations
Requires

One of:

Useful combination
See also

GTFS

Status: approvedPage for proposal

The key gtfs:stop_code=* is used in Public transportation tagging to add the stop_code from the GTFS stops.txt file to a platform/station/entrance/ ... .

It is used to find a corresponding location 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.

Combining with ref=*

There is no mechanism to infer a value of this key based on tags like railway:ref=*, ref:IFOPT=*.

Such a mechanism may cause links to GTFS objects to break when those other tags are changed. - even for something small changes like formatting.

Therefore tagging both gtfs:stop_code=* and the other tag is encouraged, even if they have the same value.

Example

Consider Station Nijmegen, it is a station which we can find in the file stops.txt in the GTFS feed.

Below is the relevant section of that table.

stops.txt
stop_id stop_code stop_name location_type parent_station platform_code ...
stoparea:17857 nm Nijmegen 1 (station)

To refer to this object we can add gtfs:stop_code:NL-OVApi=nm. Additionally we can add railway:ref=nm

Consider Nijmegen Centraal platform M, it is a platform which we can find in the file stops.txt in the GTFS feed.

Below is the relevant section of that table.

stops.txt
stop_id stop_code stop_name location_type parent_station platform_code ...
2547419 60001013 Nijmegen, Centraal Station 0 (platform) stoparea:122872 M

To refer to this object we can add gtfs:stop_code:NL-OVApi=60001013. Additionally we can add ref:IFOPT=NL:Q:60001013