Difference between revisions of "General Transit Feed Specification"

From TransitWiki
Jump to navigation Jump to search
(Change open-source GTFS editing tool reference)
(→‎Origins & history: Adding updated information on number of public GTFS feeds in the US and globally)
 
(43 intermediate revisions by 12 users not shown)
Line 3: Line 3:
 
==Introduction==
 
==Introduction==
 
The General Transit Feed Specification (GTFS) defines a common format for public transportation schedules and associated geographic information. GTFS "feeds" allow public transit agencies to publish their transit data and developers to use that data to write applications. The feeds are represented in a series of text files that are compressed into a ZIP file, and include information such as fixed-route schedules, routes, and bus stop data. GTFS datasets are used in a variety of types of applications, including trip planners such as Google Maps, mobile applications, timetable generation software, tools for transit planning and operations analysis, and other categories of applications outlined in this article.
 
The General Transit Feed Specification (GTFS) defines a common format for public transportation schedules and associated geographic information. GTFS "feeds" allow public transit agencies to publish their transit data and developers to use that data to write applications. The feeds are represented in a series of text files that are compressed into a ZIP file, and include information such as fixed-route schedules, routes, and bus stop data. GTFS datasets are used in a variety of types of applications, including trip planners such as Google Maps, mobile applications, timetable generation software, tools for transit planning and operations analysis, and other categories of applications outlined in this article.
 +
 +
[[File:GTFS data model diagram.PNG|framed|right|GTFS data model diagram]]
  
 
==Origins & history==
 
==Origins & history==
Line 11: Line 13:
 
After a successful launch with TriMet, Google Transit offered their trip planner service for free to any agency that formatted and maintained their data in the GTFS format.  In 2006, five more agencies were added.  Google Transit’s success continued as more and more agencies wanted access to a free trip planner, and were willing to put their data into the GTFS format to get it.
 
After a successful launch with TriMet, Google Transit offered their trip planner service for free to any agency that formatted and maintained their data in the GTFS format.  In 2006, five more agencies were added.  Google Transit’s success continued as more and more agencies wanted access to a free trip planner, and were willing to put their data into the GTFS format to get it.
  
Since its creation in 2005, GTFS has become the most popularly-used data format to describe fixed-route transit services in the world. Many agencies have decided to share their GTFS data openly with the public, while others choose to restrict access only to select partners (e.g., Google Maps). As of March 2012, there were are an estimated 261 transit agencies worldwide, including 227 transit agencies in the U.S., that share their GTFS data openly with the general public<ref>Front Seat Management, LLC. "City-Go-Round." Accessed March 1, 2012 from http://www.citygoround.org/agencies/</ref>. As of August 20, 2015, Google lists approximately 5900 agencies around the world for Google Transit coverage<ref>Google, Inc. "Transit – Google Maps." Accessed August 20, 2015 from http://maps.google.com/landing/transit/cities/index.html</ref>, however, some of this transit information is probably derived from sources other than GTFS.
+
Since its creation in 2005, GTFS has become the most popularly-used data format to describe fixed-route transit services in the world. Many agencies have decided to share their GTFS data openly with the public, while others choose to restrict access only to select partners (e.g., Google Maps). As of January 15, 2016, there were an estimated 1026 transit agencies worldwide, including 864 transit agencies in the U.S., that share their GTFS data openly with the general public<ref>Front Seat Management, LLC. "City-Go-Round." Accessed January 15, 2016 from http://www.citygoround.org/agencies/</ref>. As of December 2, 2019, OpenMobilityData lists 1233 providers with publicly accessible GTFS feeds, 465 of which are in the United States<ref><nowiki>https://openmobilitydata.org/feeds</nowiki></ref>. As of August 20, 2015, Google lists approximately 5900 agencies around the world for Google Transit coverage<ref>Google, Inc. "Transit – Google Maps." Accessed August 20, 2015 from http://maps.google.com/landing/transit/cities/index.html</ref>, however, some of this transit information is probably derived from sources other than GTFS.  
  
 
Even though many transit agencies created GTFS feeds with the primary purpose of benefiting from the free Google Transit trip planner, application developers, often not affiliated with the agency or Google, quickly realized that they could also create many new types of services based on the same GTFS transit data.
 
Even though many transit agencies created GTFS feeds with the primary purpose of benefiting from the free Google Transit trip planner, application developers, often not affiliated with the agency or Google, quickly realized that they could also create many new types of services based on the same GTFS transit data.
Line 18: Line 20:
  
 
==The Many Uses of GTFS Data--A Summary==
 
==The Many Uses of GTFS Data--A Summary==
"The Many Uses of GTFS Data", published by Antrim and Barbeau (2013), provides an overview of the GTFS opportunities for transit agencies and describes many different uses and benefits that can assist agencies in maximizing their investment in GTFS data.<ref>[https://www.dropbox.com/s/jq2ko64j2eth5mt/The%20Many%20Uses%20of%20GTFS%20Data%20%E2%80%93%20Opening%20the%20Door%20to%20Transit%20Applications-postTRB4%20-%20changes%20accepted.docx?dl=0 The Many Uses of GTFS Data]</ref>
+
"The Many Uses of GTFS Data", published by Antrim and Barbeau (2013), provides an overview of the GTFS opportunities for transit agencies and describes many different uses and benefits that can assist agencies in maximizing their investment in GTFS data<ref>[https://www.dropbox.com/s/jq2ko64j2eth5mt/The%20Many%20Uses%20of%20GTFS%20Data%20%E2%80%93%20Opening%20the%20Door%20to%20Transit%20Applications-postTRB4%20-%20changes%20accepted.docx?dl=0 The Many Uses of GTFS Data]</ref>.
 
 
==The Many Uses of GTFS Data--A Summary==
 
"The Many Uses of GTFS Data", published by Antrim and Barbeau (2013), provides an overview of the GTFS opportunities for transit agencies and describes many different uses and benefits that can assist agencies in maximizing their investment in GTFS data.<ref>[https://www.dropbox.com/s/jq2ko64j2eth5mt/The%20Many%20Uses%20of%20GTFS%20Data%20%E2%80%93%20Opening%20the%20Door%20to%20Transit%20Applications-postTRB4%20-%20changes%20accepted.docx?dl=0 The Many Uses of GTFS Data]</ref>
 
  
 
===Creating and Maintaining a GTFS Dataset===
 
===Creating and Maintaining a GTFS Dataset===
Line 27: Line 26:
  
 
*'''In-House'''
 
*'''In-House'''
:If the agency has sufficient in-house technical expertise, they may wish to produce and maintain the GTFS feed themselves.  Several of the industry-standard scheduling software packages from vendors such as Trapeze<ref>[http://www.trapezegroup.com/ Trapeze Group Limited]</ref>, HASTUS <ref>[http://www.giro.ca/en/products/hastus/index.htm Giro, Inc. "HASTUS - Transit scheduling and operations."]</ref> , Connexionz<ref>[http://www.connexionz.us/home Connexionz Limited. "Smart Transit Solutions."]</ref>, and Mentor Engineering <ref>[http://www.mentoreng.com/products/streets-transit/streets-schedule/schedule.html Mentor Engineering. "Transit Scheduling Software."]</ref> can often export agency data into the GTFS format, facilitating the GTFS creation & maintenance process.  However, agencies should not necessarily assume that the output of these tools produces perfect GTFS data, as agencies have indicated that they often still need to perform manual data processing on the GTFS data exported from these tools before it will be acceptable for application use <ref>[http://ntl.bts.gov/lib/34000/34000/34053/FDOT_BDK85_977-12_rpt.pdf Sean Barbeau, Nevine Labib Georggi, and Philip Winters (2010). "Travel Assistance Device (TAD) -- Deployment to Transit Agencies," National Center for Transit Research.]</ref>.
+
:If the agency has sufficient in-house technical expertise, they may wish to produce and maintain the GTFS feed themselves.  Several of the industry-standard scheduling software packages from vendors such as Trapeze<ref>[http://www.trapezegroup.com/ Trapeze Group Limited]</ref>, HASTUS<ref>[http://www.giro.ca/en/products/hastus/index.htm Giro, Inc. "HASTUS - Transit scheduling and operations."]</ref> , Connexionz<ref>[http://www.connexionz.us/home Connexionz Limited. "Smart Transit Solutions."]</ref>, and TripSpark (formerly Mentor Engineering)<ref>[http://www.tripspark.com/ Mentor Engineering. "TripSpark."]</ref> can often export agency data into the GTFS format, facilitating the GTFS creation & maintenance process.  However, agencies should not necessarily assume that the output of these tools produces perfect GTFS data, as agencies have indicated that they often still need to perform manual data processing on the GTFS data exported from these tools before it will be acceptable for application use<ref>[http://ntl.bts.gov/lib/34000/34000/34053/FDOT_BDK85_977-12_rpt.pdf Sean Barbeau, Nevine Labib Georggi, and Philip Winters (2010). "Travel Assistance Device (TAD) -- Deployment to Transit Agencies," National Center for Transit Research.]</ref>.
  
:For agencies who do not have access to sophisticated scheduling software, there are free spreadsheet-based tools for creating and maintaining GTFS data such as and XLS Tools for Google Transit by Bob Heitzman<ref>[https://sites.google.com/site/rheitzman/ Bob Heitzman. "XLS Tools for Google Transit."]</ref>, which were repackaged as “GTFS Builder” by the Rural Transit Assistance Program <ref>[http://www.nationalrtap.org/public/WebApps/GTFSBuilder.aspx National Rural Transit Assistance Program. "GTFS Builder."]</ref>.  OpenPlans, a nonprofit 501(c)3 that produces open-source civic software, started an open-source web-based GTFS Editing Tool that is now maintained by Conveyal <ref>[hhttps://github.com/conveyal/gtfs-editor Conveyal. "GTFS Editor."]</ref>.  For agencies without high-quality bus stop inventories, the open-source GTFS-OpenStreetMap Synchronization tool (GO-Sync) can help leverage crowd-sourced improvements of their GTFS bus stop inventory<ref>[Khoa Tran, Edward L. Hillsman, S. Barbeau, and M. A. Labrador (2011), "GO-Sync- A Framework to Synchronize Crowd-Sourced Mapping Contributions from Online Communities and Transit Agency Bus Stop Inventories," in ITS World Congress, Orlando, Florida, USA, October 16, 2011.]</ref>.  There are also many educational resources available online from the transit developer community for agencies interested in creating a GTFS feed<ref>[http://code.google.com/p/googletransitdatafeed/wiki/OtherGTFSTools Google Transit Data Feed. "Other GTFS Tools."]</ref> <ref>[https://groups.google.com/forum/?fromgroups#!forum/google-transit-partner-support Google, Inc. "Google Transit Partner Support Google Group."]</ref>.  
+
:For agencies who do not have access to sophisticated scheduling software, there are a variety of open-source and vendor-based tools that can be used for creating and maintaining GTFS data. One free spreadsheet-based tool is the Excel Toolkit “GTFS Builder” by the National Rural Transit Assistance Program <ref>[https://www.nationalrtap.org/Web-Apps/GTFS-Builder "National Rural Transit Assistance Program (National RTAP) GTFS Builder."]</ref>.  OpenPlans, a nonprofit 501(c)3 that produces open-source civic software, started an open-source web-based GTFS Editing Tool that is now maintained by [[Conveyal]]<ref>[https://github.com/conveyal/gtfs-editor Conveyal. "GTFS Editor."]</ref>.  For agencies without high-quality bus stop inventories, the open-source GTFS-OpenStreetMap Synchronization tool (GO-Sync) can help leverage crowd-sourced improvements of their GTFS bus stop inventory<ref>[https://github.com/CUTR-at-USF/gtfs-osm-sync Khoa Tran, Edward L. Hillsman, S. Barbeau, and M. A. Labrador (2011), "GO-Sync- A Framework to Synchronize Crowd-Sourced Mapping Contributions from Online Communities and Transit Agency Bus Stop Inventories," in ITS World Congress, Orlando, Florida, USA, October 16, 2011.]</ref>.  The open-source mobile app [[TransitWand]] can also help when in the data collection process when creating a new GTFS dataset.  There are also many educational resources available online from the transit developer community for agencies interested in creating a GTFS feed<ref>[http://code.google.com/p/googletransitdatafeed/wiki/OtherGTFSTools Google Transit Data Feed. "Other GTFS Tools."]</ref> <ref>[https://groups.google.com/forum/?fromgroups#!forum/google-transit-partner-support Google, Inc. "Google Transit Partner Support Google Group."]</ref>. Remix<ref>[http://getremix.com/ Get Remix Team. "Get Remix"]</ref> is a product for quickly sketching out transit routes and generating GTFS data.  TransLoc offers their web-based GTFS tool, TransLoc Architect<ref>[http://pages.transloc.com/architect-beta-signup/ TransLoc. "TransLoc Architect"]</ref>, to agencies for free.  A list of vendors that provide self-service products and services for GTFS creation and maintenance can be found [https://docs.google.com/spreadsheets/d/1Gc9mu4BIYC8ORpv2IbbVnT3q8VQ3xkeY7Hz068vT_GQ/pubhtml here].  If you'd like to add a vendor/product to this list, please use [https://docs.google.com/forms/d/1XZl1cHDh9NUl9r7Eq-j9RuwVJlfjgPE8IBOb54oe138/viewform this form].
 +
 
 +
In order to create and maintain GTFS, it is necessary to develop an understanding of the specification. Several [[GTFS training materials]] are available.
 +
 
 +
GTFS leaves many options available for how to describe transit services. See [[best practices for creating GTFS]] for recommendations on how to form GTFS datasets that will provide the best results in applications.
  
 
*'''Outsource'''
 
*'''Outsource'''
:Vendors such as Trillium Solutions, Inc. <ref>['http://www.trilliumtransit.com/blog/ Trillium Solutions, Inc.]</ref>, TransitEditor<ref>[http://www.transiteditor.com/index.php?q=en/home TransitEditor. "TransitEditor."]</ref>,  and Next Insight Transportation Software<ref>[http://nextinsight.com/services.php Next Insight Transportation Software. "Conductor."]</ref> provide tools and services that can aid agencies in formatting and maintaining their data in GTFS format, ranging from online tools that are operated by the agency to a full service model where the vendor creates the GTFS data for the agency.  
+
:Vendors such as Trillium Solutions, Inc.<ref>[http://trilliumtransit.com/gtfs/ Trillium Solutions, Inc.]</ref>, TransitEditor<ref>[http://www.transiteditor.com/index.php?q=en/home TransitEditor. "TransitEditor."]</ref>,  and Next Insight Transportation Software<ref>[http://nextinsight.com/services.php Next Insight Transportation Software. "Conductor."]</ref> provide tools and services that can aid agencies in formatting and maintaining their data in GTFS format, ranging from online tools that are operated by the agency to a full service model where the vendor creates the GTFS data for the agency.  A list of vendors that provide full-service products and services for GTFS creation and maintenance can be found [https://docs.google.com/spreadsheets/d/1Gc9mu4BIYC8ORpv2IbbVnT3q8VQ3xkeY7Hz068vT_GQ/pubhtml here].  If you'd like to add a vendor/product to this list, please use [https://docs.google.com/forms/d/1XZl1cHDh9NUl9r7Eq-j9RuwVJlfjgPE8IBOb54oe138/viewform this form].
  
:The cost for a transit agency to hire a vendor or consultant to create GTFS data is usually around $200-$500 per route, depending on the level of effort required<ref> [http://www.dot.ca.gov/hq/MassTrans/Docs-Pdfs/CoordinatedPlng/google.feasibility.study.pdf Northern California Google Transit Feasibility Study] </ref>.  Level of effort is determined by the number of stops, complexity and variation of the routes and schedules, and the availability and quality of existing stop location, schedule, and route alignment data.
+
:The cost for a transit agency to hire a vendor or consultant to create GTFS data is usually around $200-$500 per route, depending on the level of effort required<ref>[http://www.dot.ca.gov/hq/MassTrans/Docs-Pdfs/CoordinatedPlng/google.feasibility.study.pdf Northern California Google Transit Feasibility Study] </ref>.  Level of effort is determined by the number of stops, complexity and variation of the routes and schedules, and the availability and quality of existing stop location, schedule, and route alignment data.
  
 
===Disseminating GTFS Data===
 
===Disseminating GTFS Data===
Read full page on GTFS Data Dissemination here: [[GTFS Data Dissemination]]
+
See [[GTFS Data Dissemination]] for a more detailed overview.
  
Some agencies have chosen to share their transit data with select vendors such as Google Transit. They are typically concerned with legal exposure due to the lack of accuracy of data, loss of control of agency brand, and loss of control of dissemination of transit service information. However, many others feel the benefits of open transit data outweigh the risks, since developers can screen-scrape agency websites, which is not ideal for either party. Currently, over 200 transit agencies  in the United States have chosen to openly share their GTFS data. <ref> [http://www.citygoround.org/agencies/ City-Go-Round] </ref>
+
Some agencies have chosen to share their transit data with select vendors such as Google Transit. They are typically concerned with legal exposure due to the lack of accuracy of data, loss of control of agency brand, and loss of control of dissemination of transit service information. However, many others feel the benefits of open transit data outweigh the risks, since developers can screen-scrape agency websites, which is not ideal for either party. Currently, over 200 transit agencies  in the United States have chosen to openly share their GTFS data<ref>[http://www.citygoround.org/agencies/ City-Go-Round] </ref>.
  
The Google Transit Partner Program allows public transportation agencies to provide schedules and geographic information to Google Maps and other Google applications that show transit information. The website provides instructions for agencies just starting the GTFS sharing process and gives suggestions on how to create high-quality feeds. <ref> [http://maps.google.com/help/maps/mapcontent/transit/index.html Google Transit Partner Program] </ref> For agencies that wish to make their data available to everyone, they can share the feeds on websites such as GTFS Data Exchange, which was designed to help developers and transit agencies efficiently share and retrieve GTFS data. <ref> [http://www.gtfs-data-exchange.com/ GTFS Data Exchange] </ref>
+
The Google Transit Partner Program allows public transportation agencies to provide schedules and geographic information to Google Maps and other Google applications that show transit information. The website provides instructions for agencies just starting the GTFS sharing process and gives suggestions on how to create high-quality feeds<ref>[http://maps.google.com/help/maps/mapcontent/transit/index.html Google Transit Partner Program] </ref>. For agencies that wish to make their data available to everyone, they can share the feeds on websites such as GTFS Data Exchange, which was designed to help developers and transit agencies efficiently share and retrieve GTFS data<ref>[http://www.gtfs-data-exchange.com/ GTFS Data Exchange] </ref>.
  
 
===Applications Based on GTFS===
 
===Applications Based on GTFS===
The following are just a few examples of the types of applications and names of existing application that use GTFS. The [[:Category:GTFS-consuming applications]] page aims to be a directory of applications that utilize GTFS data for various purposes.
+
The following are just a few examples of the types of applications and names of existing application that use GTFS. '''[[:Category:GTFS-consuming applications]] is directory of applications that utilize GTFS data for various purposes.'''
 
*'''Trip planning and maps'''
 
*'''Trip planning and maps'''
:[https://maps.google.com Google Maps] is currently implemented for most transit agencies that publish GTFS. Other examples of trip planning applications are [https://www.bing.com/maps/ Bing Maps] and [http://www.opentripplanner.org/ OpenTripPlanner]. A number of other websites graphically map where GTFS data is available (e.g. [http://tracker.geops.ch/ TRAVIC: Transit Visualization Client]) and the types of data available.
+
:There are a variety of applications that assist a transit customer in planning a trip from one location to another using public transportation. These provide step-by-step information on how to use various transportation options to reach a custom destination. See [[:Category:Trip-planning & navigation applications]]
 
*'''Timetable creation'''
 
*'''Timetable creation'''
:Timetable Publisher is free, open-source software that creates timetables in both HTML and PDF formats. TriMet in Portland, Oregon uses TimeTable Publisher to create all its timetables, as does Hampton Roads Transit in the south-eastern Virginia area.
+
:There are applications that create a printable list of the agency’s schedule in a timetable format. They can also take the form of an HTML friendly or plain-text timetable. See [[:Category:Timetable generation software]]
 
*'''Data visualization'''
 
*'''Data visualization'''
:[https://www.walkscore.com/ WalkScore] is a website that helps people quantify “walkability” of an area by showing the nearby amenities within walking distance. The website also has a Transit Score, that rates how well an address is served by public transportation.  These Transit Scores are now shown on a number of other websites, such as real estate websites where they assist potential purchasers rank how well a property is served by public transport.
+
:Various applications provide graphic visualizations of transit routes, stops, and schedule data. They can provide details such as the walkability, the quality of public transportation serving the area, and relate those factors to a third criteria specific to the service (i.e. apartments available in the area.) See [[:Category:Data Visualization applications]]
 
*'''Accessibility'''
 
*'''Accessibility'''
:The Travel Assistant Device (TAD) is designed for sight-impaired or intellectually-disabled passengers. Phones with the application installed give audio and vibrating alerts when it is time for the passenger to pull the stop cord and alight from the bus
+
:These include applications that assist transit riders with disabilities in using public transportation. See [[:Category:Accessibility devices and applications]]
 
*'''Real-time transit information'''
 
*'''Real-time transit information'''
:Newer formats, such as [[GTFS-realtime]] and [http://bustime.mta.info/wiki/Developers/SIRIIntro SIRI], can be added as an extension to a basic GTFS format so transit agencies can share [[real-time information]].
+
:These applications that use GTFS data along with a real-time information source to provide estimated arrival information to transit riders.  Newer formats, such as [[GTFS-realtime]] and [http://bustime.mta.info/wiki/Developers/SIRIIntro SIRI], can be added as an extension to a basic GTFS format so transit agencies can share [[real-time information]]. See [[:Category:Real-time applications]]
 +
 
 +
===GTFS Extensions===
 +
 
 +
Additional fields can be added to GTFS datasets to accommodate a variety of application-specific needs, even if these fields are not in the official specification.  The following are documented examples of the GTFS spec being extended:
 +
 
 +
*'''[https://support.google.com/transitpartners/answer/2450962 Google Extensions to GTFS]''' - Includes fields for multi-agency fare attributes, maximum transfer counts per fare, additional route types, station vehicle types, station entrances, station platforms, translations, and route-to-route and trip-to-trip transfers.
 +
*'''[https://github.com/osplanning-data-standards/GTFS-PLUS GTFS-Plus]''' - A GTFS-based data transit network data standard suitable for dynamic transit modeling.
 +
* '''[https://groups.google.com/d/msg/gtfs-changes/TnQ80dVYA1g/DUsAT1moBAAJ Extra files for GTFS-to-HTML]''' - timetables.txt, timetable_stop_order.txt, route_pages.txt, route_page_assoc.txt] - A set of five files that are used to produce HTML timetables from GTFS datasets by the [[GTFS-to-HTML]] open-source software.
 +
* '''[[http://www.transitwiki.org/TransitWiki/images/e/e7/GTFS%2B_Additional_Files_Format_Ver_1.7.pdf GTFS+]] in use by the SF Bay Area's Metropolitan Transportation Commission''' - Set of extra files that define discounted fares, stop attributes, and other information.
 +
*'''[https://developer.trimet.org/gtfs_ext.shtml TriMet Extensions to GTFS]''' - Includes fields for bike_policy_url, feed_id, realtime_feeds info, route_sort_order, and continuous_stops.
 +
*'''[[GTFS-to-HTML]]''' software utilizes extra GTFS tables to configure the construction of timetables from GTFS schedule data, documented on the project github site.
 +
*'''[https://github.com/ODOT-PTS/GTFS-ride GTFS-ride]''' - A GTFS-based ridership data standard.
 +
 
 +
===Best practices===
  
==External Links==
+
See the [[Best practices for creating GTFS]] page for links to GTFS best practices documentation.
* [http://transitfeeds.com/ TransitFeeds.com] - An extensive collection of official public transit data from around the world, including GTFS, GTFS-RealTime and more.
 
* [http://en.wikipedia.org/wiki/General_Transit_Feed_Specification Wikipedia page on GTFS]
 
* [http://www.appropedia.org/General_Transit_Feed_Specification The GTFS page on the Appropedia Wiki], which includes links to [http://www.appropedia.org/Open_Source_Transport_Informatics_tools pages on useful tools for working GTFS data].
 
* [http://www.apta.com/resources/reportsandpublications/Documents/APTA-Embracing-Open-Data.pdf APTA Policy Development and Research - Public Transportation Embracing Open Data] - APTA's discussion of the benefits and challenges of open data.
 
* [http://onlinepubs.trb.org/Onlinepubs/tcrp/tcrp_syn_115.pdf TCRP Synthesis 115 - Open Data: Challenges and Opportunities for Transit Agencies] - A report looking at the benefits and challenges of open transit data.
 
  
 
==References==
 
==References==
<references/>
+
<references />
  
 
==Additional Reading==
 
==Additional Reading==

Latest revision as of 18:12, 2 December 2019

A GTFS dataset from a transit agency, showing the schedules, routes, and shapes files. Dataset from San Francisco BART.

Introduction

The General Transit Feed Specification (GTFS) defines a common format for public transportation schedules and associated geographic information. GTFS "feeds" allow public transit agencies to publish their transit data and developers to use that data to write applications. The feeds are represented in a series of text files that are compressed into a ZIP file, and include information such as fixed-route schedules, routes, and bus stop data. GTFS datasets are used in a variety of types of applications, including trip planners such as Google Maps, mobile applications, timetable generation software, tools for transit planning and operations analysis, and other categories of applications outlined in this article.

GTFS data model diagram

Origins & history

TriMet in Portland, Oregon was one of the first public agencies to try and tackle the problem of online transit trip planners through the use of open datasets that are shared with the general public. In 2005, TriMet approached Google, as well as a few other driving trip planner vendors, and asked if they had any plans on incorporating transit in their trip planners based on public TriMet data[1]. Google was the only vendor to reply to TriMet’s request. TriMet and Google then decided to team up to implement one of the first transit trip planners in Portland.

One of the first issues that TriMet and Google faced was the problem of sustainable data – in order to provide quality trips, the trip planner would need quality transit schedule, route, and stop data in an electronic format that was constantly up-to-date. TriMet worked with Google to format their transit data into an easily maintainable and consumable format that could be imported into Google Maps. This transit data format became known as the Google Transit Feed Specification (GTFS)[2]. In 2005, this trip planning service was launched as Google Transit[3].

After a successful launch with TriMet, Google Transit offered their trip planner service for free to any agency that formatted and maintained their data in the GTFS format. In 2006, five more agencies were added. Google Transit’s success continued as more and more agencies wanted access to a free trip planner, and were willing to put their data into the GTFS format to get it.

Since its creation in 2005, GTFS has become the most popularly-used data format to describe fixed-route transit services in the world. Many agencies have decided to share their GTFS data openly with the public, while others choose to restrict access only to select partners (e.g., Google Maps). As of January 15, 2016, there were an estimated 1026 transit agencies worldwide, including 864 transit agencies in the U.S., that share their GTFS data openly with the general public[4]. As of December 2, 2019, OpenMobilityData lists 1233 providers with publicly accessible GTFS feeds, 465 of which are in the United States[5]. As of August 20, 2015, Google lists approximately 5900 agencies around the world for Google Transit coverage[6], however, some of this transit information is probably derived from sources other than GTFS.

Even though many transit agencies created GTFS feeds with the primary purpose of benefiting from the free Google Transit trip planner, application developers, often not affiliated with the agency or Google, quickly realized that they could also create many new types of services based on the same GTFS transit data.

As a result of third-party developer innovation, GTFS data is now being used by a variety of third-party software applications for many different purposes, including trip planning, maps, timetable creation, mobile data, visualization, accessibility, analysis tools for planning, and real-time information systems. In 2010, the GTFS format name was changed to the General Transit Feed Specification[7] to accurately represent its use in many different applications outside of Google products.

The Many Uses of GTFS Data--A Summary

"The Many Uses of GTFS Data", published by Antrim and Barbeau (2013), provides an overview of the GTFS opportunities for transit agencies and describes many different uses and benefits that can assist agencies in maximizing their investment in GTFS data[8].

Creating and Maintaining a GTFS Dataset

Before transit agencies can benefit from Google Transit and many other transit applications, they must create and disseminate their data in the GTFS format. First, agencies should understand the GTFS format, and determine how their data will fit into this format. Second, transit agencies must choose between formatting a GTFS dataset in-house or outsourcing the task. The datasets have to be updated when there are schedule changes, and since major transit agencies update their schedules several times a year, some agencies might find greater benefits to outsourcing.

  • In-House
If the agency has sufficient in-house technical expertise, they may wish to produce and maintain the GTFS feed themselves. Several of the industry-standard scheduling software packages from vendors such as Trapeze[9], HASTUS[10] , Connexionz[11], and TripSpark (formerly Mentor Engineering)[12] can often export agency data into the GTFS format, facilitating the GTFS creation & maintenance process. However, agencies should not necessarily assume that the output of these tools produces perfect GTFS data, as agencies have indicated that they often still need to perform manual data processing on the GTFS data exported from these tools before it will be acceptable for application use[13].
For agencies who do not have access to sophisticated scheduling software, there are a variety of open-source and vendor-based tools that can be used for creating and maintaining GTFS data. One free spreadsheet-based tool is the Excel Toolkit “GTFS Builder” by the National Rural Transit Assistance Program [14]. OpenPlans, a nonprofit 501(c)3 that produces open-source civic software, started an open-source web-based GTFS Editing Tool that is now maintained by Conveyal[15]. For agencies without high-quality bus stop inventories, the open-source GTFS-OpenStreetMap Synchronization tool (GO-Sync) can help leverage crowd-sourced improvements of their GTFS bus stop inventory[16]. The open-source mobile app TransitWand can also help when in the data collection process when creating a new GTFS dataset. There are also many educational resources available online from the transit developer community for agencies interested in creating a GTFS feed[17] [18]. Remix[19] is a product for quickly sketching out transit routes and generating GTFS data. TransLoc offers their web-based GTFS tool, TransLoc Architect[20], to agencies for free. A list of vendors that provide self-service products and services for GTFS creation and maintenance can be found here. If you'd like to add a vendor/product to this list, please use this form.

In order to create and maintain GTFS, it is necessary to develop an understanding of the specification. Several GTFS training materials are available.

GTFS leaves many options available for how to describe transit services. See best practices for creating GTFS for recommendations on how to form GTFS datasets that will provide the best results in applications.

  • Outsource
Vendors such as Trillium Solutions, Inc.[21], TransitEditor[22], and Next Insight Transportation Software[23] provide tools and services that can aid agencies in formatting and maintaining their data in GTFS format, ranging from online tools that are operated by the agency to a full service model where the vendor creates the GTFS data for the agency. A list of vendors that provide full-service products and services for GTFS creation and maintenance can be found here. If you'd like to add a vendor/product to this list, please use this form.
The cost for a transit agency to hire a vendor or consultant to create GTFS data is usually around $200-$500 per route, depending on the level of effort required[24]. Level of effort is determined by the number of stops, complexity and variation of the routes and schedules, and the availability and quality of existing stop location, schedule, and route alignment data.

Disseminating GTFS Data

See GTFS Data Dissemination for a more detailed overview.

Some agencies have chosen to share their transit data with select vendors such as Google Transit. They are typically concerned with legal exposure due to the lack of accuracy of data, loss of control of agency brand, and loss of control of dissemination of transit service information. However, many others feel the benefits of open transit data outweigh the risks, since developers can screen-scrape agency websites, which is not ideal for either party. Currently, over 200 transit agencies in the United States have chosen to openly share their GTFS data[25].

The Google Transit Partner Program allows public transportation agencies to provide schedules and geographic information to Google Maps and other Google applications that show transit information. The website provides instructions for agencies just starting the GTFS sharing process and gives suggestions on how to create high-quality feeds[26]. For agencies that wish to make their data available to everyone, they can share the feeds on websites such as GTFS Data Exchange, which was designed to help developers and transit agencies efficiently share and retrieve GTFS data[27].

Applications Based on GTFS

The following are just a few examples of the types of applications and names of existing application that use GTFS. Category:GTFS-consuming applications is directory of applications that utilize GTFS data for various purposes.

  • Trip planning and maps
There are a variety of applications that assist a transit customer in planning a trip from one location to another using public transportation. These provide step-by-step information on how to use various transportation options to reach a custom destination. See Category:Trip-planning & navigation applications
  • Timetable creation
There are applications that create a printable list of the agency’s schedule in a timetable format. They can also take the form of an HTML friendly or plain-text timetable. See Category:Timetable generation software
  • Data visualization
Various applications provide graphic visualizations of transit routes, stops, and schedule data. They can provide details such as the walkability, the quality of public transportation serving the area, and relate those factors to a third criteria specific to the service (i.e. apartments available in the area.) See Category:Data Visualization applications
  • Accessibility
These include applications that assist transit riders with disabilities in using public transportation. See Category:Accessibility devices and applications
  • Real-time transit information
These applications that use GTFS data along with a real-time information source to provide estimated arrival information to transit riders. Newer formats, such as GTFS-realtime and SIRI, can be added as an extension to a basic GTFS format so transit agencies can share real-time information. See Category:Real-time applications

GTFS Extensions

Additional fields can be added to GTFS datasets to accommodate a variety of application-specific needs, even if these fields are not in the official specification. The following are documented examples of the GTFS spec being extended:

  • Google Extensions to GTFS - Includes fields for multi-agency fare attributes, maximum transfer counts per fare, additional route types, station vehicle types, station entrances, station platforms, translations, and route-to-route and trip-to-trip transfers.
  • GTFS-Plus - A GTFS-based data transit network data standard suitable for dynamic transit modeling.
  • Extra files for GTFS-to-HTML - timetables.txt, timetable_stop_order.txt, route_pages.txt, route_page_assoc.txt] - A set of five files that are used to produce HTML timetables from GTFS datasets by the GTFS-to-HTML open-source software.
  • [GTFS+] in use by the SF Bay Area's Metropolitan Transportation Commission - Set of extra files that define discounted fares, stop attributes, and other information.
  • TriMet Extensions to GTFS - Includes fields for bike_policy_url, feed_id, realtime_feeds info, route_sort_order, and continuous_stops.
  • GTFS-to-HTML software utilizes extra GTFS tables to configure the construction of timetables from GTFS schedule data, documented on the project github site.
  • GTFS-ride - A GTFS-based ridership data standard.

Best practices

See the Best practices for creating GTFS page for links to GTFS best practices documentation.

References

  1. Matthew Roth. (2012). "How Google and Portland’s TriMet Set the Standard for Open Transit Data." SF.STREETSBLOG.ORG. January 5, 2010. Accessed: from http://sf.streetsblog.org/2010/01/05/how-google-and-portlands-trimet-set-the-standard-for-open-transit-data/
  2. Google, Inc. "General Transit Feed Specification Reference." Accessed February 24, 2012 from http://developers.google.com/transit/gtfs/reference
  3. Matthew Roth. (2012). "How Google and Portland’s TriMet Set the Standard for Open Transit Data." SF.STREETSBLOG.ORG. January 5, 2010. Accessed: from http://sf.streetsblog.org/2010/01/05/how-google-and-portlands-trimet-set-the-standard-for-open-transit-data/
  4. Front Seat Management, LLC. "City-Go-Round." Accessed January 15, 2016 from http://www.citygoround.org/agencies/
  5. https://openmobilitydata.org/feeds
  6. Google, Inc. "Transit – Google Maps." Accessed August 20, 2015 from http://maps.google.com/landing/transit/cities/index.html
  7. Joe Hughes, gtfs-changes list, "Spec update for January 11, 2010." https://groups.google.com/d/topic/gtfs-changes/iC18a8NY6N4/discussion
  8. The Many Uses of GTFS Data
  9. Trapeze Group Limited
  10. Giro, Inc. "HASTUS - Transit scheduling and operations."
  11. Connexionz Limited. "Smart Transit Solutions."
  12. Mentor Engineering. "TripSpark."
  13. Sean Barbeau, Nevine Labib Georggi, and Philip Winters (2010). "Travel Assistance Device (TAD) -- Deployment to Transit Agencies," National Center for Transit Research.
  14. "National Rural Transit Assistance Program (National RTAP) GTFS Builder."
  15. Conveyal. "GTFS Editor."
  16. Khoa Tran, Edward L. Hillsman, S. Barbeau, and M. A. Labrador (2011), "GO-Sync- A Framework to Synchronize Crowd-Sourced Mapping Contributions from Online Communities and Transit Agency Bus Stop Inventories," in ITS World Congress, Orlando, Florida, USA, October 16, 2011.
  17. Google Transit Data Feed. "Other GTFS Tools."
  18. Google, Inc. "Google Transit Partner Support Google Group."
  19. Get Remix Team. "Get Remix"
  20. TransLoc. "TransLoc Architect"
  21. Trillium Solutions, Inc.
  22. TransitEditor. "TransitEditor."
  23. Next Insight Transportation Software. "Conductor."
  24. Northern California Google Transit Feasibility Study
  25. City-Go-Round
  26. Google Transit Partner Program
  27. GTFS Data Exchange

Additional Reading

Shasta County Regional Transportation Planning Agency. "Northern California Google Transit Feasibility Study.". (2009).

The Shasta RTPA led a study on the feasibility of integrating small-urban and rural public transit service schedules and geographic information with Google Transit. The study makes recommendations on how Google Transit can be improved to address the needs of small rural agencies.

Florida Department of Transportation. "SunRail Electronic Trip Planning Study Final Report" (2013).

This report was prepared for the FDOT in advance of their SunRail launch; it analyzes various online trip planning options for SunRail to consider, and includes a section on GTFS's benefits, risks, and applications.