Information Technology Reference
In-Depth Information
This sparked the rise of the General Transit Feed Specification (GTFS), which sought to
provide a consistent protocol for the format of transit data. Any historian of this time will
observe that the GTFS format is almost exactly the format used by TriMet in Portland for
its transit data. As is often the case, the first mover in a given sphere of technology is de
facto the standard setter. Soon, many more government and transport agencies had the
foresight to release the data they held in this format, and it has become the standard for
sharing transit schedules, routes and related data.
Almost everyone has, at one time or another, caught a bus, train, plane, or ferry, and so
we can jump past the basics of what a GTFS feed is. Instead, let's look at the
specification from the point of view of an Android developer.
Reviewing GTFS Components
A GTFS feed is simply a bunch of textual data in comma-separated format, split into
several text files, and then packaged as a single zip file for easy handling. As a
developer of either web applications or native Android applications, you can source a
GTFS feed's zip file and then work with it to incorporate transit locations, schedule
information, and so forth into your code. A typical GTFS zip file is composed of (and
requires) the following text files:
Agency.txt The agencies and organizations that provided the data in
this GTFS package.
Calendar.txt The dates for various services based on a weekly roster.
This includes details of start and end dates for services, and days
when they are, and are not, available.
Routes.txt The set of stops a given service makes, and the path taken
between them. This matches what most people think of as a single
bus route, train journey, etc.
Stops.txt The distinct locations where services stop to allow
passengers to board and alight, including terminals or end-points.
Stop_times.txt The times at which a given vehicle arrives at, and
leaves a stop. This also allows for the calculation of "dwell time,”
which is the period a service remains at a stop.
Trips.txt Trips for a given route, where a given vehicle makes
sequential stops.
In addition to the preceding list of mandatory files , a given GTFS feed can also include
some or all of the following optional additional data in the respective text files
Calendar_dates.txt Lists the exceptions to the service details of
standard scheduling in the calendar.txt file.
Fare_attributes.txt The details on what it actually costs to use a given
service, as charged by the agency running the service.
 
Search WWH ::




Custom Search