GTFS Export
- 1 Export options
- 2 Export content
- 2.1 File Structure
- 2.2 GTFS identifiers
- 2.3 Selected Vehicle Journeys
- 2.4 GTFS Agencies
- 2.5 GTFS Stops
- 2.6 GTFS Route
- 2.7 GTFS Calendar and GTFS Calendar Date (Service)
- 2.8 GTFS Trips
- 2.9 GTFS Stop Times
- 2.10 GTFS Transfers
- 2.11 GTFS Shapes
- 2.12 GTFS Booking Rules
- 2.13 GTFS Location Groups
Chouette can export a dataset into the GTFS format by following the below rules.
Export options
The Chouette GTFS Export contains 2 specific options :
Prefer Referent Stop Areas : with this option, the GTFS export exports the referent stops areas when exists instead of the particular stop areas. See GTFS Stops section for details.
Ignore Monomodal Stop Places with a single Quay : with this option, the GTFS export doesn’t export a GTFS parent station with only a single quay. See GTFS Stops section for details.
Export content
File Structure
The export creates a zip containing the following csv files:
agencies.txt: GTFS Export | GTFS Agenciesstops.txt: GTFS Export | GTFS Stopsroutes.txt: GTFS Export | GTFS Routetrips.txt: GTFS Export | GTFS Tripsstop_times.txt: GTFS Export | GTFS Stop Timescalendars.txt: GTFS Export | GTFS Calendar and GTFS Calendar Date (Service)shapes.txt: GTFS Export | GTFS Shapestransfers.txt: GTFS Export | GTFS Transfersbooking_rules.txt: GTFS Export | GTFS Booking Ruleslocation_group_stops.txt: GTFS Export | GTFS Location Groups
These files are compliant with the GTFS standard.
GTFS identifiers
Each export is associated with a codespace. This codespace is used to find code value into Chouette models to identify the GTFS resources.
By default, the GTFS export uses the codespace “external” (used by default by the Chouette imports). For Stop Areas, Lines and Companies, the registration number is used as code (to be changed).
The export prevents automatically two GTFS resources to use the same code value. In this case, the Chouette unique identifier will be used in place. For example, a GTFS Trip can be identified by chouette:VehiculeJourney:868007fe-07f8-4e02-8615-2341ba5a82c4:LOC when the associated code can be used as unique value.
Selected Vehicle Journeys
According to the options, the export selects the Vehicle Journeys which must included into the exported data. These exported Vehicle Journeys guide Chouette to select all other kind of models which must be included in the export (time tables, journey pattern, route, stop areas, etc).
GTFS Agencies
For each Company associated to an exported Vehicle Journey (or the Line of this Vehicle Journey), Chouette create a GTFS Agency in agencies.txt with the following information:
GTFS Agency | Details | Chouette Company |
|---|---|---|
agency_id | GTFS Agency ID |
|
agency_name | Name |
|
agency_url | Default Contact URL |
|
agency_timezone | Time Zone or |
|
agency_phone | Default Contact Phone |
|
agency_email | Default Contact Email |
|
agency_lang | Default Language |
|
If the Chouette Company registration number is empty, the Company ID is used as agency_id value.
A default GTFS Agency can be exported by Chouette, if one of the exported Vehicle Journeys isn’t associated to a Company or a Line associated to a Company. This default GTFS Agency uses these values:
Default GTFS Agency attribute | GTFS Agency |
|---|---|
agency_id |
|
agency_name |
|
agency_timezone |
|
A warning message is added to the Export when the default GTFS Agency is used.
GTFS Stops
For each Stop Area associated to a Route of an exported Vehicle Journey or each specific Stop Area of an exported Vehicle Journey, Chouette creates a GTFS Stop in stops.txt. Non commercial Stop Areas (borders, etc) are ignored by the GTFS export.
Parents of exported Stop Areas are exported (except parents that has just one Stop Area child if the option “Ignore Monomodal Stop Places with a single Quay” is activated).
If the exported Stop Area as a referent Stop Place and the option “Prefer Referent Stop Areas” is activated, the Referent Stop Area will be exported at the place of the particular Stop Area.
Each GTFS Stop uses the following information:
GTFS Stop | Details | Chouette Stop Area |
|---|---|---|
stop_id | GTFS Stop ID |
|
stop_name | Name |
|
stop_lat | Latitude |
|
stop_lon | Longitude |
|
stop_desc | Comment |
|
stop_url | URL |
|
location_type |
|
|
parent_station | Associated Parent Stop ID |
|
stop_timezone | Time Zone |
|
wheelchair_boarding |
|
|
platform_code |
| use |
GTFS Route
For each Line associated to an exported Vehicle Journey, Chouette creates a GTFS Route in routes.txtwith the following information:
GTFS Route | Details | Chouette Line |
|---|---|---|
route_id | GTFS Route ID |
|
agency_id | Associated GTFS Agency ID | Company or |
route_short_name | Number |
|
route_long_name | Published Name |
|
route_desc | Comments |
|
route_type | Transport mode | See values below |
route_url | URL |
|
route_color | Line color |
|
route_text_color | Text color |
|
The GTFS route type value is selected according to the Chouette Line transport mode according to this mapping:
Netex transport mode and submode | GTFS route_type | GTFS transport mode |
|---|---|---|
Transport mode : tram Transport submode : none |
| canonical |
Transport mode : metro Transport submode : none |
| |
Transport mode : rail Transport submode : none |
| |
Transport mode : bus Transport submode : none |
| |
Transport mode : water Transport submode : none |
| |
Transport mode : funicular Transport submode : streetCableCar |
| |
Transport mode : telecabin Transport submode : none |
| |
Transport mode : funicular Transport submode : none |
| |
Transport mode : trolleyBus Transport submode : none |
| |
Transport mode : rail Transport submode : monorail |
| |
Transport mode : rail Transport submode : none |
| extended |
Transport mode : rail Transport submode : interregionalRail |
| |
Transport mode : coach Transport submode : none |
| |
Transport mode : coach Transport submode : regionalCoach |
| |
Transport mode : coach Transport submode : specialCoach |
| |
Transport mode : coach Transport submode : commuterCoach |
| |
Transport mode : bus Transport submode : none |
| |
Transport mode : bus Transport submode : schoolAndPublicServiceBus |
| |
Transport mode : air Transport submode : none |
| |
Transport mode : hireCar Transport submode : none |
| |
Transport mode : taxi Transport submode : none |
|
GTFS Calendar and GTFS Calendar Date (Service)
For each Timetable including in the exported period associated to exported Vehicle Journeys :
for the first TimeTable Period and included/excluded Dates, Chouette creates a GTFS Calendar and GTFS Calendar Dates with the same GTFS Service ID.
if there is more than one Timetable Period, Chouette creates additional GTFS Calendars for each Timetable Period with a new GTFS Service ID.
Each GTFS Calendar are created with the following information:
GTFS Calendar | Details | Chouette TimeTable Period |
|---|---|---|
service_id | GTFS Service ID |
|
monday | if monday is selected |
|
tuesday | if tuesday is selected | |
wednesday | if wednesday is selected | |
thursday | if thursday is selected | |
friday | if friday is selected | |
saturday | if saturday is selected | |
sunday | if sunday is selected | |
start_date | Period start date |
|
end_date | Period end date |
|
Each GTFS Calendar Date are written in calendar_dates.txt :
GTFS Calendar Date | Details | Chouette TimeTable Date |
|---|---|---|
service_id | GTFS Service ID |
|
date | Date |
|
exception_type | date is included : 1 date is excluded : 2 |
|
When several GTFS Calendars / Services are required, the GTFS export will need to create several GTFS Trips. See GTFS Trips section.
GTFS Trips
For each exported Vehicle Journey and each GTFS Service require to export the associated TimeTables, Chouette creates a dedicated GTFS Trip in trips.txt with the following information:
GTFS Trip | Details | Chouette Vehicle Journey |
|---|---|---|
trip_id | GTFS Trip ID | code or |
route_id | Associated GTFS Route ID |
|
service_id | Associated GTFS Service ID |
|
trip_short_name | Published Name |
|
direction_id |
| Route |
shape_id | Associated GTFS Shape id |
|
A single Chouette Vehicle Journey can be exported into several GTFS Trip because of GTFS format limitations on service/calendar description.
Example
A Timetable A on week days with two periods and an excluded date (on the first period)
A Timetable B with only included dates
A Vehicle Journey 1 which uses the two timetables A & B
A Vehicle Journey 2 which uses only the Timetable B
These models should be exported as: