GTFS-Flex

Brief Description

What is GTFS-Flex?

A detailed description of the superordinate General Transit Feed Specification (GTFS(-Static)) can be found HERE. GTFS basically describes the public transport timetables and associated geographical information, such as the locations of stops.

Over the course of time, various so-called extensions have been defined. One of the extensions is GTFS-Flex. GTFS-Flex should be used accordingly with GTFS-Static.

Who is behind it?

GTFS-Flex is designed to make it easier to find on-demand transport services.

With its acceptance on 18 March 2024, GTFS-Flex changed from a “proposal” to an official extension of GTFS-Static.

Why does the Open Data platform offer this?

On behalf of the Federal Office of Transport (FOT), the System Tasks Customer Information Plus (SKI+) office aims to provide as many of the current standards as possible.

In addition to GTFS-Flex, we also offer the on-demand services as NeTEx.

Access the Data

The visualisation of the locations.geojson with the OnDemand zones can be found here: https://data.opentransportdata.swiss/dataset/odv-gtfs-flex-geojson

Functional Description

What information do we map with GTFS-Flex? Size:

GTFS-Flex extends GTFS as it allows the different forms of on-demand offers to be displayed. These include: on-demand scheduled transport, on-demand corridor transport and on-demand surface transport. More on this in the On-Demand technical concept (see further information).

In addition, the extension makes it possible to map the service areas (geographical areas) that are important for area transport and to map services as time windows (instead of fixed departure and arrival times).

How is the information structured? The model.

Like GTFS, GTFS-Flex is made up of several files. We have also adapted the standard to include some aspects relevant to Switzerland and summarised them in a Swiss profile (see further information).

Technical description

The following table is taken from the Swiss GTFS profile. The profile is considered a master’s degree.

NoFilenameRequiredDefinition
1agency.txtRequiredTransit agencies with service represented in this dataset
2stops.txtRequiredStops where vehicles pick up or drop off riders. Also defines stations and station entrances.
3routes.txtRequiredTransit routes. A route is a group of trips that are displayed to riders as a single service
4trips.txtRequiredTrips for each route. A trip is a sequence of two or more stops that occur during a specific time period.
5stop_times.txtRequiredExtended and modified file to include time-windows that a vehicle picks up and drops off at stops or location groups/areas.
6calendar.txtConditionally RequiredService dates specified using a weekly schedule with start and end dates. This file is required unless all dates of service are defined in calendar.txt
7calendar_dates.txtConditionally RequiredExceptions for the services defined in the calendar.txt. If calendar.txt is omitted, then calendar_dates.txt is required and must contain all dates of service.
8transfers.txtOptionalWhen calculating an itinerary, GTFS-consuming applications interpolate transfers based on allowable time and stop proximity
9feed_info.txtOptionalThis file contains information about the dataset itself, rather than the service the dataset describes
10booking_rules.txtRequiredNew file that defines the booking rules / requirements that must be met for a successful booking
11locations.geojsonRequiredNew GeoJSON (and non-CSV) formatted file that allows defining Zones using Polygons and MultiPolygons (for Zones with “holes”).
12location_groupsRequiredNew files to allow grouping of stops which allow predetermined groups of these features to be specified on individual rows of stop_times.txt.

This file specifically defines the group.

13location_group_stopsRequiredNew files to allow grouping of stops which allow predetermined groups of these features to be specified on individual rows of stop_times.txt.

This file specifically defines the mapping of the groups from location_groups to stops.

14booking_rules_additional_messages.txtOptionalNew file to allow publication of more than one booking rule. This file contains the message_type and message of a booking_rule.

Further information

Restrictions

  • GTFS-Flex does not cover all aspects of on-demand services, which is why an extension of GTFS-Flex (thus an extension of the extension) is currently being sought: https://share.mobilitydata.org/gtfs-ondemand
  • GTFS-Flex, like the other GTFS-* standards, does not offer a booking mechanism, i.e. no price information

Further information

booking_rules_additional_messages.txt
message_id,booking_rule_id,message_type,message
"message_booking_rule_j26_3_1","booking_rule_j26_3","Time interval","Reservationen nehmen wir täglich ab 20.00 Uhr bis zum Ende der Bedienzeiten über die Rufnummer +41 79 608 75 00 entgegen."
"message_booking_rule_j26_3_2","booking_rule_j26_3","Other","Bitte melden Sie den Bedarf «Rollstuhl» über die Rufnummer +41 79 608 75 00 an"
"message_booking_rule_j26_4_3","booking_rule_j26_4","Other","Rollstuhltransport mit Vorlaufzeit von 2 Stunden"
"message_booking_rule_j26_4_2","booking_rule_j26_4","Age limit","Kinder bis zum vollendeten 12. Lebensjahr werden nur in Begleitung einer erwachsenen Person befördert, zudem nur in einem Kindersitz (ausser sie sind grösser als 150 cm). Es stehen in beschränktem Masse Kindersitze in den Fahrzeugen zur Verfügung (Kindersitze sowie eine Sitzerhöhung). Für Kleinkinder unter einer Größe von 75 cm ist die Begleitperson zur Mitnahme einer geeigneten Babyschale verpflichtet, ansonsten kann das Kleinkind nicht befördert werden"
"message_booking_rule_j26_4_1","booking_rule_j26_4","Time interval",""
"message_booking_rule_j26_1_1","booking_rule_j26_1","Time interval",""
"message_booking_rule_j26_2_1","booking_rule_j26_2","Time interval",""
"message_booking_rule_j26_2_2","booking_rule_j26_2","Other","Reservation unter 0800 60 30 60 (Gratisnummer), 7 Tage die Woche, 6.00 bis 24.00 Uhr.
Reservation und Stornierung telefonisch bis eine Stunde vor Abfahrt (während Öffnungszeiten der Zentrale) möglich. Abfahrten vor 6 Uhr müssen am Vortag telefonisch bis spätestens eine Stunde vor Schliessung der Zentrale reserviert werden."
"message_booking_rule_j26_7_1","booking_rule_j26_7","Time interval",""
"message_booking_rule_j26_7_2","booking_rule_j26_7","Age limit","Fahrgäste unter 12 Jahren können nur in Begleitung von Erwachsenen mitfahren. Ausnahmeregelungen mit Einverständniserklärungen der Erziehungsberechtigter sind möglich. Wenden Sie sich bei Bedarf an info@mybuxi.ch"
"message_booking_rule_j26_7_3","booking_rule_j26_7","Other","Assistenzhunde mit Ausweis sind erlaubt."
"message_booking_rule_j26_14_2","booking_rule_j26_14","Other","Fahrgäste unter 12 Jahren können nur in Begleitung von Erwachsenen mitfahren. Ausnahmeregelungen mit Einverständniserklärungen der Erziehungsberechtigter sind möglich. Wenden Sie sich bei Bedarf an info@mybuxi.ch."
"message_booking_rule_j26_14_1","booking_rule_j26_14","Time interval",""
"message_booking_rule_j26_14_3","booking_rule_j26_14","Other","Assistenzhunde mit Ausweis sind erlaubt."
"message_booking_rule_j26_13_3","booking_rule_j26_13","Other","Buchung nur via App"
"message_booking_rule_j26_13_2","booking_rule_j26_13","Age limit","Fahrgäste unter 12 Jahren können nur in Begleitung von Erwachsenen mitfahren. Ausnahmeregelungen mit Einverständniserklärungen der Erziehungsberechtigter sind möglich. Wenden Sie sich bei Bedarf an info@mybuxi.ch."
"message_booking_rule_j26_13_4","booking_rule_j26_13","Other","Assistenzhunde mit Ausweis"
"message_booking_rule_j26_13_1","booking_rule_j26_13","Time interval","Buchungen nur via App möglich"
"message_booking_rule_j26_6_1","booking_rule_j26_6","Time interval",""
"message_booking_rule_j26_8_2","booking_rule_j26_8","Other","Buchung nur via App"
"message_booking_rule_j26_8_3","booking_rule_j26_8","Other","Assistenzhunde mit Ausweis"
"message_booking_rule_j26_8_1","booking_rule_j26_8","Time interval",""
"message_booking_rule_j26_9_1","booking_rule_j26_9","Time interval",""
"message_booking_rule_j26_10_1","booking_rule_j26_10","Time interval",""
"message_booking_rule_j26_12_2","booking_rule_j26_12","Age limit",""
"message_booking_rule_j26_12_1","booking_rule_j26_12","Time interval",""
"message_booking_rule_j26_12_3","booking_rule_j26_12","Inhabitants only","test ads"
"message_booking_rule_j26_12_4","booking_rule_j26_12","Members only","ATLAS_TTFNID_Buchsatzüberschriften"