0% found this document useful (0 votes)
24 views36 pages

Reference - Static Transit - Google Developers

Uploaded by

Parik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views36 pages

Reference - Static Transit - Google Developers

Uploaded by

Parik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

Reference

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).

Record - A basic data structure comprised of a number of different �eld values


describing a single entity (e.g. transit agency, stop, route, etc.). Represented, in a table,
as a row.

Field - A property of an object or entity. Represented, in a table, as a column.

Field Value - An individual entry in a �eld. Represented, in a table, as a single cell.

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

Color - A color encoded as a six-digit hexadecimal number. Refer to


https://htmlcolorcodes.com to generate a valid value (the
Enum - An option from a set of prede�ned constants de�ned in the "Description"
column.
Example: The route_type �eld contains a 0 for tram, a 1 for subway...

ID - An ID �eld value is an internal ID, not intended to be shown to riders, and is a


sequence of any UTF-8 characters. Using only printable ASCII characters is
recommended. IDs de�ned in one .txt �le are often referenced in another .txt �le.
Example: The stop_id �eld in stops.txt (#stopstxt) is a ID. The stop_id �eld in
stop_times.txt (#stop_timestxt) is an ID referencing stops.stop_id.

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.

Non-negative Float - A �oating point number greater than or equal to 0.

Non-negative Integer - A integer greater than or equal to 0.

Phone number - A phone number.

Time - Time in the HH:MM:SS format (H:MM:SS is also accepted). The time is
Dataset �les

This speci�cation de�nes the following �les:

Filename Required De�nes

agency.txt (#agencytxt) Required Transit agencies with service represented in this dataset.

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:

All �les must be saved as comma-delimited text.

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.

All �eld names are case-sensitive.

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.

agency_name Text Required Full name of the transit agency.

You might also like