How to represent GTFS feeds using FIWARE NGSI
This repository is now archived and subsequent works will be carried out the in Smart data models repositories.
Introduction
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 | GtfsAgency |
stops.txt | GtfsStop. GtfsStation. GtfsAccessPoint |
routes.txt | GtfsRoute |
trips.txt | GtfsTrip. See also GtfsService |
stop_times.txt | GtfsStopTime |
calendar.txt | GtfsCalendarRule |
calendar_dates.txt | GtfsCalendarDateRule |
fare_attributes.txt | N/A |
fare_rules.txt | N/A |
shapes.txt | See GtfsRoute, GtfsTrip |
frequencies.txt | GtfsFrequency |
transfers.txt | GtfsTransferRule |
feedinfo.txt | N/A |