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.

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.

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