Skip to content

OJP and the new TRIAS and GTFS interface

A new version of GTFS/TRIAS was put into production together with the OJP.

Reactions/feedback/questions

The following Trello project is for queries and comments.

https://trello.com/b/jiIZwszF/open-journey-planner

Invitations otherwise via opendata@sbb.ch

 

GTFS – RT

There is a new GTFS that must be used for the GTFS-RT. The dataset is entitled GTFS2020: https://opentransportdata.swiss/en/dataset/timetable-2020-gtfs2020

The GTFS data is uploaded to the FTP server once a week every Wednesday at 9.10 a.m. and is then available.

The value of the route_id’s and the trip_id’s for the same line/trip has changed compared to the old versions because we have adapted the data modelling in the new OJP DIVA system. Because the stop_id’s come from DIDOK, they are of course identical in both systems (ODP1.0 and ODP2.0/OJP).

API: https://api.opentransportdata.swiss/gtfsrt2020  

Test-Key: 57c5dbbbf1fe4d000100001842c323fa9ff44fbba0b9b925f0c052d1

 

What has changed:

  • Stops that are no longer used are now transmitted in TripUpdate with “scheduled_relationship”: “skipped”
  • The values for route_id and trip_id have changed because the data is modelled differently.
  • route_type 907 is no longer available in the new GTFS standard. The 907s are mapped to 1300.
  • In the new GTFS, only the type is specified in route_desc. This corresponds to V.580. We will now change this to the submode so that it contains similar information as before. The route_type is also adjusted. (KNOWN ISSUE, should be resolved by mid-October).
  • Pseudo-stops (stops such as the Lötschberg base tunnel) are included in Static and RT. Unfortunately with the wrong type at the moment. (KNOWN ISSUE). As a workaround, these stops should always be filtered out (id<1000).

 

GTFS-RT can also be obtained as JSON. However, this is intended more for testing and not for productive operation.

TRIAS

The new (TRIAS2020) interface is documented on the following pages:

LocationInformationRequest has been added with TRIAS2020.

New API: https://api.opentransportdata.swiss/trias2020

Test-Key: 57c5dbbbf1fe4d000100001842c323fa9ff44fbba0b9b925f0c052d1

What has changed:

  • LocationInformationRequest/Response is now available
  • TripRequest/Response now also displays connections that require a change of train. This means that there are several legs in one trip. There are also more types of legs.
  • The schema locations must be specified in the header.
  • The TRIAS elements are now transmitted with the namespace prefix “trias:” and “siri:”. If a library is used for parsing, this should continue to work without any problems.
  • The line names have changed.

Example TripRequest

 

Example TripRequest 2

Example StopEventRequest

Example TripInformationRequest

Attention: The JourneyRef must be searched for via a StopEventRequest or a TripRequest. The JourneyRef can change with every data import of a timetable. This will only change with the introduction of the Swiss Journey ID.

 

API-Explorer (TRIAS2020)