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

The  GTFS (General Transit Feed Specification) is a data format that was created for sharing public transportation information such as bus stops and bus routes and timetables.

It is useful for potential users of OSM data to provide routing using public transport as in many cases timetables change so often that representing them in OSM is basically impossible. In some cities timetables can be expected to change daily due to road/track closures/renovations. And in some areas timetables are massively changes multiple times during the year, for example as holidays and school start/end.

In such cases data consumers can use OSM data for roads and stop positions and footways and take available trips on public transport directly from the organization.

It was originally called the Google Transit Feed Specification, was developed by Google. It is now maintained by the MobilityData organization which also maintains tools for using GTFS data, a database of GTFS data, and the General Bikeshare Feed Specification.


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 both 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