Feature Representation

In addition to the generic FME feature attributes that FME Workbench adds to all features (see About Feature Type Attributes), this format also adds format-specific attributes (Format Attributes).

Attribute Name

Contents

gtfs_type

(read-only)

The type of geometry stored within the feature.

Values:

  • gtfs_point: Used for stops and shapes_points.
  • gtfs_line: Used for shapes only.
  • gtfs_none: All other feature types.

Feature Types

Most feature types correspond directly with the files and schema defined by the specification. Refer to the GTFS Reference for their definitions. To reduce duplication of documentation, only differences are documented here.

Feature Type

Notes

stops

The stop_lat and stop_lon columns are not represented as attributes. Instead, they are represented as point geometry on the feature, under the LL84 coordinate system.

shapes

Each row in shapes.txt is not represented as a separate feature. Instead, for each shape_id, the GTFS reader/writer conveys a single feature with line geometry containing all the points as ordered by the shape_pt_sequence column.

shape_pt_sequence and shape_dist_traveled are represented as measures on the line, while shape_pt_lat and shape_pt_lon form the vertices.

FME represents shape_pt_sequence values as floats. When writing, values are rounded down to an integer. If shape_pt_sequence measures are not provided, sequential values are automatically written, starting at 0.

Attribute Types

The GTFS Reader/Writer defines the following attribute types.

Note: These attribute types are intended as a guideline or hint so that users can understand what the specification expects for a given attribute.

Attribute Type

Notes

text

Used for most attributes.

date Used for dates in calendar and calendar_dates.
time Used for arrival_time and departure_time in the stop_times feature type.
boolean Used for the day of week flags in the calendar feature type.
float

Used for shape_dist_traveled in the stop_times feature type.

The GTFS writer will warn and skip the feature if the attribute value cannot be interpreted as a float.

integer

Used for integer values and attributes that have enumerated values as defined by the specification.

The GTFS writer will warn and skip the feature if the attribute value cannot be interpreted as an integer.