GTFS, which stands for General Transit Feed Specification or (originally) Google Transit Feed Specification, defines a common format for
public transportation schedules and associated geographic information.
GTFS contains only static or scheduled information about public transport services, and is sometimes known as GTFS Static to distinguish it from the
GTFS Realtime
GTFS, which stands for General Transit Feed Specification or (originally) Google Transit Feed Specification, defines a common format for Public transport timetable, public transportation schedules and associated geographic information. GTFS cont ...
extension, which defines how information on the realtime status of services can be shared.
History
What was to become GTFS started out as a side project of Google
Google LLC () is an American multinational technology company focusing on search engine technology, online advertising, cloud computing, computer software, quantum computing, e-commerce, artificial intelligence, and consumer electronics. ...
employee Chris Harrelson in 2005, who “monkeyed around with ways to incorporate transit data into Google Maps
Google Maps is a web mapping platform and consumer application offered by Google. It offers satellite imagery, aerial photography, street maps, 360° interactive panoramic views of streets ( Street View), real-time traffic conditions, and rou ...
when he heard from Tim and Bibiana McHugh, married IT managers at TriMet
TriMet, formally known as the Tri-County Metropolitan Transportation District of Oregon, is a public agency that operates mass transit in a region that spans most of the Portland metropolitan area in the U.S. state of Oregon. Created in 1969 ...
, the transit agency for Portland
Portland most commonly refers to:
* Portland, Oregon, the largest city in the state of Oregon, in the Pacific Northwest region of the United States
* Portland, Maine, the largest city in the state of Maine, in the New England region of the northeas ...
, Oregon”. McHugh is cited with being frustrated about finding transit directions in unfamiliar cities, while popular mapping services were already offering easy-to-use driving directions at the time.
Bibiana and Tim McHugh eventually got into contact with Google
Google LLC () is an American multinational technology company focusing on search engine technology, online advertising, cloud computing, computer software, quantum computing, e-commerce, artificial intelligence, and consumer electronics. ...
and provided the company with CSV exports of TriMet's schedule data. In December 2005, Portland became the first city to be featured in the first version of Google's “Transit Trip Planner”. In September 2006, five more US cities were added to the Google Transit Trip Planner, and the data format released as the ''Google Transit Feed Specification''.
In the United States
The United States of America (U.S.A. or USA), commonly known as the United States (U.S. or US) or America, is a country primarily located in North America. It consists of 50 states, a federal district, five major unincorporated territorie ...
, there had not been any standard for public transit timetables prior to the advent of GTFS, not even a de facto standard
A ''de facto'' standard is a custom or convention that has achieved a dominant position by public acceptance or market forces (for example, by early entrance to the market). is a Latin phrase (literally " in fact"), here meaning "in practice b ...
. According to long-time BART
Bart is a masculine given name, usually a diminutive of Bartholomew, sometimes of Barton, Bartolomeo, etc.
Bart is a Dutch and Ashkenazi Jewish surname, and derives from the name ''Bartholomäus'', a German form of the biblical name ''Barthol ...
website manager Timothy Moore, before the advent of GTFS, BART had to provide different data consumers with different formats, making a standardized transit format very desirable. The publicly and freely available format specification, as well as the availability of GTFS schedules, quickly made developers base their transit-related software on the format. This resulted in “hundreds of useful and popular transit applications” as well as catalogues listing available GTFS feeds. Due to the common data format those applications adhere to, solutions do not need to be custom-tailored to one transit operator, but can easily be extended to any region where a GTFS feed is available.
Due to the wide use of the format, the “Google” part of the original name was seen as a misnomer “that makes some potential users shy away from adopting GTFS”. As a consequence, it was proposed to change the name of the specification to ''General Transit Feed Specification'' in 2009.
Applications
Journey planning
GTFS is typically used to supply data on public transit for use in multi-modal journey planner
A journey planner, trip planner, or route planner is a specialized search engine used to find an optimal means of travelling between two or more given locations, sometimes using more than one transport mode. Searches may be optimized on differen ...
applications. In most cases, GTFS is combined with a detailed representation of the street/pedestrian network to allow routing to take place from point to point rather than just between stops. OpenTripPlanner is open-source software
Open-source software (OSS) is computer software that is released under a license in which the copyright holder grants users the rights to use, study, change, and distribute the software and its source code to anyone and for any purpose. Op ...
that can do journey planning with a combination of GTFS and OpenStreetMap
OpenStreetMap (OSM) is a free, open geographic database updated and maintained by a community of volunteers via open collaboration. Contributors collect data from surveys, trace from aerial imagery and also import from other freely licensed g ...
data. Other general purpose applications exist such as the ArcMap
ArcMap is the main component of Esri's ArcGIS suite of geospatial processing programs, and is used primarily to view, edit, create, and analyze geospatial data. ArcMap allows the user to explore data within a data set, symbolize features accordin ...
Network Analyst extension which can incorporate GTFS for transit routing.
GTFS was originally designed for use in Google Transit
Google Maps is a web mapping platform and consumer application offered by Google. It offers satellite imagery, aerial photography, street maps, 360° interactive panoramic views of streets ( Street View), real-time traffic conditions, and rou ...
, an online multi-modal journey planning application.
Accessibility research
GTFS is often used in research on transit accessibility
Accessibility is the design of products, devices, services, vehicles, or environments so as to be usable by people with disabilities. The concept of accessible design and practice of accessible development ensures both "direct access" (i. ...
where it is typically used to estimate travel times by transit from one point to many other points at different times of day. Studies however have called such applications into question due to their reliance on schedules alone without accounting for reliability issues and regular schedule non-adherence.
Comparing service levels
GTFS has been used to measure changes in accessibility due to changes in transit service provision, either actual or proposed.[{{Cite journal, last1=Farber, first1=Steven, last2=Grandez, first2=Maria, date=2017, title=Transit Accessibility, Land Development and Socioeconomic Priority: A Typology of Planned Station Catchment Areas in the Greater Toronto and Hamilton Area, url=https://stevenfarber.files.wordpress.com/2016/11/public-draft-transit-accessibility-developable-land-and-socioeconomic-priority-farber-grandez.pdf , journal= Journal of Transport and Land Use , volume=10, issue=1, doi=10.5198/jtlu.2017.980, id= (note: forthcoming edition)] Analysis of changes in service over time can be accomplished by simply comparing published GTFS data for the same agency from different time periods. For comparison of existing service with proposed infrastructure or service changes, a future GTFS must often be constructed by hand based on proposed service characteristics.
Feed registries
Public GTFS feeds have been aggregated in a variety of feed registries:
TransitFeeds / OpenMobilityData
maintains a directory of GTFS and GTFS Realtime feeds and an interactive website for browsing feed contents.
GTFS Data Exchange
(2008 - 2016) allowed public transit agencies of all sizes to upload copies of their GTFS feeds. The website is no longer active but still allows browsing and download of historical data.
Transitland
(2014 - present) maintains a directory of GTFS and GTFS Realtime feeds in 55+ countries and provides both an interactive website and APIs for querying feed contents. Transitland was originally created by Mapzen
Mapzen, founded in 2013 and headquartered in New York City, was an open source mapping platform company focused on the core components of geo platforms, including search (geocoding), rendering ( vector tiles), navigation/ routing, and data. Mapze ...
and is now maintained b
Interline Technologies
Structure
A GTFS feed is a collection of at least six, and up to 13 CSV files (with extension .txt
A text file (sometimes spelled textfile; an old alternative name is flatfile) is a kind of computer file that is structured as a sequence of lines of electronic text. A text file exists stored as data within a computer file system. In operat ...
) contained within a .zip
ZIP is an archive file format that supports lossless data compression. A ZIP file may contain one or more files or directories that may have been compressed. The ZIP file format permits a number of compression algorithms, though DEFLATE is th ...
file. Preferred character encoding is UTF-8
UTF-8 is a variable-width encoding, variable-length character encoding used for electronic communication. Defined by the Unicode Standard, the name is derived from ''Unicode'' (or ''Universal Coded Character Set'') ''Transformation Format 8-bit'' ...
. Together, the related CSV tables describe a transit system's scheduled operations as visible to riders. The specification is designed to be sufficient to provide trip planning functionality, but is also useful for other applications such as analysis of service levels and some general performance measures. In contrast to European transit industry exchange standards such as Transmodel Transmodel (formally ''CEN TC278, Reference Data Model For Public Transport, EN12896'') is the CEN European Reference Data Model for Public Transport Information; it provides a conceptual model of common public transport concepts and data structur ...
or VDV-45X, GTFS only includes scheduled operations that are meant to be distributed to riders. It is also limited to ''scheduled'' information and does not include real-time information. However, real-time information can be related to GTFS schedules according to the related GTFS Realtime
GTFS, which stands for General Transit Feed Specification or (originally) Google Transit Feed Specification, defines a common format for Public transport timetable, public transportation schedules and associated geographic information. GTFS cont ...
specification.[
Following are descriptions of the tables required for a valid GTFS data feed. Each table is literally a text ]CSV file
A comma-separated values (CSV) file is a delimited text file that uses a comma to separate values. Each line of the file is a data record. Each record consists of one or more fields, separated by commas. The use of the comma as a field separato ...
whose filename is the name of the table, suffixed by '.txt'. So for the 'agency' table below, a CSV file called 'agency.txt' would be included in a valid GTFS feed.
Mandatory tables
agency
The agency table provides information about the transit agency as such, including name, website and contact information.
Required fields:
* agency_name
* agency_url
* agency_timezone
routes
The routes table identifies distinct routes. This is to be distinguished from distinct routings (or paths), several of which may belong to a single route.
Required fields:
* route_id (primary key
In the relational model of databases, a primary key is a ''specific choice'' of a ''minimal'' set of attributes (Column (database), columns) that uniquely specify a tuple (Row (database), row) in a Relation (database), relation (Table (database), t ...
)
* route_short_name
* route_long_name
* route_type
trips
Required fields:
* trip_id (primary key)
* route_id (foreign key A foreign key is a set of attributes in a table that refers to the primary key of another table. The foreign key links these two tables. Another way to put it: In the context of relational databases, a foreign key is a set of attributes subject to ...
)
* service_id (foreign key)
Optional fields:
* block_id - The block ID indicates the schedule block to which a trip belongs.
stop_times
Required fields:
* stop_id (primary key)
* trip_id (foreign key)
* arrival_time
* departure_time
* stop_sequence
Note that dwell time may be modelled by the difference between the arrival and departure times. However, many agencies do not seem to model dwell time for most stops.
stops
The stops table defines the geographic locations of each and every actual stop or station in the transit system as well as, and optionally, some of the amenities associated with those stops.
Required fields:
* stop_id (primary key)
* stop_name
* stop_lon
* stop_lat
calendar
The calendar table defines service patterns that operate recurrently such as, for example, every weekday. Service patterns that don't repeat such as for a one-time special event will be defined in the calendar_dates table.
Required fields:
* service_id (primary key)
* Monday
* Tuesday
* Wednesday
* Thursday
* Friday
* Saturday
* Sunday
* start_date
* end_date
Optional tables
calendar_dates.txt
fare_attributes.txt
fare_rules.txt
shapes.txt
Rules for drawing lines on a map to represent a transit organization's routes.
frequencies.txt
Headway (time between trips) for routes with variable frequency of service.
transfers.txt
Rules for making connections at transfer points between routes.
feed_info.txt
See also
* Bing Maps
Bing Maps (previously Live Search Maps, Windows Live Maps, Windows Live Local, and MSN Virtual Earth) is a web mapping service provided as a part of Microsoft's Bing suite of search engines and powered by the Bing Maps Platform framework. Since 20 ...
* Google Transit
Google Maps is a web mapping platform and consumer application offered by Google. It offers satellite imagery, aerial photography, street maps, 360° interactive panoramic views of streets ( Street View), real-time traffic conditions, and rou ...
* Journey planner
A journey planner, trip planner, or route planner is a specialized search engine used to find an optimal means of travelling between two or more given locations, sometimes using more than one transport mode. Searches may be optimized on differen ...
References
This article contains excerpts fro
"Opening Public Transit Data in Germany"
by Stefan Kaufmann, which is available under a Creative Commons Attribution 3.0 unported license.
External links
GTFS Specification
History of GTFS
GTFS Tools
GTFS resource center
managed b
MobilityData
General Transit Feed Specification
article on TransitWiki, with history, uses and applications, production methods, and best practices
Public transport information systems
Scheduling (transportation)
Web syndication formats
Computer file formats