General Transit Feed Specification (GTFS) Reader/Writer

Licensing options for this format begin with FME Desktop Professional Edition.

Overview

The General Transit Feed Specification (GTFS) Reader/Writer plug-in provides FME with the ability to read and write static public transit schedules and associated geographic data. GTFS is an open standard maintained by Google.

The following excerpts from the official website for the specification describe the purpose and structure of GTFS datasets:

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 write applications that consume that data in an interoperable way.

A GTFS feed is composed of a series of text files collected in a ZIP file. Each file models a particular aspect of transit information: stops, routes, trips, and other schedule data. The details of each file are defined in the GTFS reference. An example feed can be found in the GTFS examples. A transit agency can produce a GTFS feed to share their public transit information with developers, who write tools that consume GTFS feeds to incorporate public transit information into their applications. GTFS can be used to power trip planners, time table publishers, and a variety of applications, too diverse to list here, that use public transit information in some way.

Each feature type corresponds to a single text file in a GTFS dataset.

Reader Overview

The GTFS Reader accepts two kinds of datasets: a GTFS ZIP archive (typically named google_transit.zip), or a text file matching a filename in the specification.

If the dataset is a text file, then only features from that file will be read, regardless of what feature types are present. Each feature type corresponds to a single text file in a GTFS dataset. Files that are not part of the specification are not read. Attributes that are not part of the specification are read, but do not automatically appear on the schema of feature types.

To read files that may be in a GTFS archive but are not part of the specification, use FME’s CSV Reader.

Input Data Validation

The GTFS reader does not perform any validation of input data. If you are interested in validation functionality, please visit the FME Community and suggest an idea.

Writer Overview

Each feature type corresponds to a single text file in a GTFS dataset. When the GTFS Writer is added to a workspace, all required and optional feature types and attributes, as defined by the specification, are included. Other feature types may not be added. However, arbitrary attributes may be added to existing feature types. Columns may also be omitted from the output by deleting the definition for the corresponding attribute on a feature type.

The GTFS Writer can write to a directory or a ZIP file. To write to a ZIP file, specify a path to a new or existing ZIP file. The path must exist. Any existing ZIP file will be overwritten.

Output Data Validation

The GTFS writer does not perform any validation of output data. Arbitrary values are accepted for most attributes, including attributes that expect an enumerated value defined in the specification. Primary key constraints are not enforced. Please contact Safe Software if you are interested in validation functionality.

FME Community

Search the FME Community for GTFS.