General Transit Feed Specification

From OpenStreetMap Wiki
(Redirected from Key:gtfs id)
Jump to navigation Jump to search

The  General Transit Feed Specification (GTFS), originally called the Google Transit Feed Specification, was developed by Google as a format for sharing public transportation information such as bus stops and bus routes.


Looking on Taginfo at the tags that are currently in use there was no decision about the name space made, yet, as underscore (gtfs_*) and semi-colon (gtfs:*) are used.

Similar is the situation about multiple values where it is not clear how to handle these cases (example).

At least for routes, gtfs_id=* or gtfs:id=* can be misleading as it is not clear which of route_id, shape_id or trip_id is meant and more than one of the three ids can be added to a PTv2 route relation.

Overview of used tags

gtfs_id=* gtfs_stop_code=* gtfs_stop_id=*
gtfs:id=* gtfs:stop_code=* gtfs:stop_id=*
gtfs_dataset_id=* gtfs_feed=* gtfs_release_date=* gtfs_name=* gtfs_description=*
gtfs:dataset_id=* gtfs:feed=* gtfs:release_date=* gtfs:name=* gtfs:description=*
gtfs_route_id=* gtfs_shape_id=* gtfs_trip_id=* gtfs_trip_id:sample=*
gtfs:route_id=* gtfs:shape_id=* gtfs:trip_id=* gtfs:trip_id:sample=*
gtfs_agency_id=* gtfs_agency_name=* gtfs_agency_url=*
gtfs:agency_id=* gtfs:agency_name=* gtfs:agency_url=*

Alternative for stops

In Europe, for public transport stops, the  European standard IFOPT is defined and in some GTFS-data the stop_code is identical to the IFOPT references. In these situations, instead of gtfs_id=*, gtfs_stop_code=* or gtfs:stop_id=*, it is wise to use the established ref:IFOPT=*.

Data Sources

Visualizing of GTFS

  • PTNA - nice online visualization of aggregated and correctly licensed GTFS data with tag recommendations for route relations and map overlay for shapes.

Conversion of OpenStreetMap and GTFS


  • osm2gtfs - An extendable python script to query OpenStreetMap data about public transport, combining it with time information provided from a different source and convert it into the GTFS format.


  • GO-Sync (aka gtfs-osm-sync) - a desktop tool to synchronize GTFS feeds with OSM
  • GTFS-OSM-Validator - console tool that will read GTFS and output exact problems it finds in OSM
  • gtfs-sql-importer - This tool can convert GTFS to SQL postgis schema where GTFS can be further manipulated. More examples of this tool can be found in GTFS SQL examples.

Editor support

Software using tags


External links