How to represent GTFS feeds using FIWARE NGSI


The General Transit Feed Specification (GTFS), also known as GTFS static or static transit, defines a common format for public transportation schedules and associated geographic information. GTFS "feeds" let public transit agencies publish their transit data and developers write applications that consume that data in an interoperable way.

This document provides guidelines on how to map GTFS feeds into FIWARE NGSI content. This work leverages on LinkedGTFS specification. Whenever possible the NGSI attributes map directly to GTFS fields. Nonethless for some Entity Types extra attributes are suggested in order to better support the data model using the NGSI information model.

General rules

Entity Attributes (Properties or Relationships) are subject to the restrictions defined by the GTFS specification If an Attribute is an enumeration its value shall be provided as per the GTFS specification (not LinkedGTFS).

Summary of Entity mappings with GTFS

GTFS Feed Member Name NGSI Entity Type
agency.txt gtfs:Agency
stops.txt gtfs:Stop. gtfs:Station. gtfs:AccessPoint
routes.txt gtfs:Route
trips.txt gtfs:Trip. See also gtfs:Service
stop_times.txt gtfs:StopTime
calendar.txt gtfs:CalendarRule
calendar_dates.txt gtfs:CalendarDateRule
fare_attributes.txt N/A
fare_rules.txt N/A
shapes.txt See gtfs:Route, gtfs:Trip
frequencies.txt gtfs:Frequency
transfers.txt gtfs:TransferRule
feedinfo.txt N/A