Reference - Static Transit - Google Developers
Reference - Static Transit - Google Developers
This document de�nes the format and structure of the �les that comprise a GTFS dataset.
Table of contents
1. Term de�nitions (#term_de�nitions)
2. Field types (#�eld_types)
3. Dataset �les (#dataset_�les)
4. File requirements (#�le_requirements)
5. Field de�nitions (#�eld_de�nitions)
agency.txt (#agencytxt)
stops.txt (#stopstxt)
routes.txt (#routestxt)
trips.txt (#tripstxt)
stop_times.txt (#stop_timestxt)
calendar.txt (#calendartxt)
calendar_dates.txt (#calendar_datestxt)
fare_attributes.txt (#fare_attributestxt)
fare_rules.txt (#fare_rulestxt)
shapes.txt (#shapestxt)
frequencies.txt (#frequenciestxt)
transfers.txt (#transferstxt)
pathways.txt (#pathwaystxt)
levels.txt (#levelstxt)
feed_info.txt (#feed_infotxt)
translations.txt (#translationstxt)
attributions.txt (#attributionstxt)
dataset creates a new version of the dataset. Datasets should be published at a
public, permanent URL, including the zip �le name. (e.g., https://www.agency.org
/gtfs/gtfs.zip).
Required - The �eld must be included in the dataset, and a value must be provided in
that �eld for each record. Some required �elds permit an empty string as a value
(denoted in this speci�cation as empty). To enter an empty string, just omit any text
between the commas for that �eld.
Optional - The �eld may be omitted from the dataset. If an optional column is
included, some of the entries in that �eld may be empty strings. To enter an empty
string, just omit any text between the commas for that �eld. Note that an omitted �eld
is equivalent to a �eld that is entirely empty.
Conditionally required - The �eld or �le is required under certain conditions, which are
outlined in the �eld or �le description. Outside of these conditions, this �eld or �le is
optional.
Service day - A service day is a time period used to indicate route scheduling. The
exact de�nition of service day varies from agency to agency but service days often do
not correspond with calendar days. A service day may exceed 24:00:00 if service
begins on one day and ends on a following day. For example, service that runs from
08:00:00 on Friday to 02:00:00 on Saturday, could be denoted as running from
08:00:00 to 26:00:00 on a single service day.
Field types
Language Code - An IETF BCP 47 language code. For an introduction to IETF BCP 47,
refer to http://www.rfc-editor.org/rfc/bcp/bcp47.txt
(http://www.rfc-editor.org/rfc/bcp/bcp47.txt) and http://www.w3.org/International/articles
/language-tags/ (http://www.w3.org/International/articles/language-tags/).
Example: en for English, en-US for American English or de for German.
Latitude - WGS84 latitude in decimal degrees. The value must be greater than or equal
to -90.0 and less than or equal to 90.0.
Example: 41.890169 for the Colosseum in Rome.
Longitude - WGS84 longitude in decimal degrees. The value must be greater than or
equal to -180.0 and less than or equal to 180.0.
Example: 12.492269 for the Colosseum in Rome.
Time - Time in the HH:MM:SS format (H:MM:SS is also accepted). The time is
Dataset �les
stops.txt (#stopstxt) Required Stops where vehicles pick up or drop off riders. Also de�nes
stations and station entrances.
routes.txt (#routestxt) Required Transit routes. A route is a group of trips that are displayed
to riders as a single service.
trips.txt (#tripstxt) Required Trips for each route. A trip is a sequence of two or more
stops that occur during a speci�c time period.
stop_times.txt Required Times that a vehicle arrives at and departs from stops for
(#stop_timestxt) each trip.
calendar.txt Conditionally Service dates speci�ed using a weekly schedule with start
(#calendartxt) required and end dates. This �le is required unless all dates of
service are de�ned in calendar_dates.txt
File requirements
The following requirements apply to the format and contents of the dataset �les:
The �rst line of each �le must contain �eld names. Each subsection of the Field
de�nitions (#�eld_de�nitions) section corresponds to one of the �les in a GTFS dataset
and lists the �eld names that may be used in that �le.
Field values may not contain tabs, carriage returns or new lines.
agencies and brands are distinct. This document uses the
term "agency" in place of "brand". A dataset may contain
data from multiple agencies. This �eld is required when the
dataset contains data for multiple transit agencies,
otherwise it is optional.