Tools & More

Brief Description

What is Tools & More?

This page provides an overview of the various tools, systems, and further links that can help users of OpenTransportData.swiss.

Who is behind it?

The tools, systems and links presented here were developed either by our Customer Information + System Tasks team (SKI+), our partners or externals.

Why does the open data platform offer this?

Many of the tools help to monitor and use the data and interfaces on OpenTransportData.swiss better.

Functional Description

For handling HRDF timetable data

HRDF Duplicates

  • Link: https://tools.odpch.ch/hrdf-check-duplicates
  • Code: https://github.com/openTdataCH/OJP-Showcase/tree/develop/apps/hrdf-duplicates-report
  • Purpose: This tool makes it possible to identify contradictory journeys in the HRDF data and check whether they are duplicates or to validate any similarities. Specifically, the system searches for *Z journey number entries that belong to the same transport company. According to the HRDF definition, the ‘…journey number is a unique number within an administration…’ per delivery. As an additional functionality, the tool also takes into account the validity periods for the journeys defined in BITFELD.
  • Instructions:
    • First, the HRDF record (see https://data.opentransportdata.swiss/dataset/timetable-54-2024-hrdf) must be selected, i.e. the day. Then the transport company must be selected, as it is unique for each transport company.
      • The system then determines all journey numbers that occur multiple times for the transport company, taking into account their effective validity periods. The result is output grouped by offer category or transport type. In the example, there are 4 journey numbers (310, 320, 322, 328) for the ‘EC’ transport type, each of which is duplicate. Journey number 771 of type IC 3 appears to have 19 duplicates.

      • In the detailed view for the duplicates, a user can now take a closer look at and check the possible duplicates. A visual inspection of the first three entries clearly shows the differences, so the displayed variants are not ‘real’ duplicates. However, according to the HRDF-RV (in theory), they would be.
      • Note: the tool offers an alternative display via the ‘Consolidated Report’ selection. Where all identified duplicates are output as a table across all transport companies and all days.

HRDF Bitfields

  • Code: https://github.com/openTdataCH/OJP-Showcase/tree/develop/apps/bitfeld-viz
  • Purpose: Visual representation of the validity periods as provided as bit code in the BITFELD file in HRDF format. Specifically, they are provided as hexadecimal numbers, which in turn represent the bit order.
  • Instructions:
    • First, insert the bit field value to be visualised. Then select the timetable period to be applied.
    • After that, you can see a visualisation of the given data
    • Note: You can also enter ‘real’ bit fields, i.e. a sequence of zeros and ones (011000101…).

HRDF Query

For handling GTFS timetable and real-time data

GTFS-Static & GTFS-RT Comparer

  • Code: https://github.com/openTdataCH/OJP-Showcase/tree/develop/apps/gtfs-rt-status
  • Purpose: This tool makes it possible to compare the static GTFS data (Static) with the real-time data in order to identify missing data elements in the respective datasets. Data elements here are transport companies as well as specific trips/trips.
  • Instructions:
    • The GTFS-Static and GTFS-Realtime files are preselected. You can specify the time period to be checked for deviations. By pressing the ‘Compare’ button, the comparison is carried out.
    • After the comparison has been carried out, the differences to the static dataset are displayed based on the real-time dataset. Specifically, a small overview with the number of deviations (‘stats’). Then there are the transport companies for the real-time data that are not listed in the corresponding register (https://data.opentransportdata.swiss/dataset/go-realtime) (‘Agencies missing from GO-Realtime’). The transport companies that are listed in the register but for which no real-time data was found (‘Agencies without GTFS-RT’). As well as a list of GTFS real-time datasets for which no suitable counterpart could be found in the static dataset (‘Missing GTFS static entries’).
    • After the overview for GTFS-Realtime, there is an overview for GTFS-Static. First, as before, the number of deviations (‘stats’) with ‘reverse sign’. Then the list of static data for which real-time data is missing. In the ‘Stops’ column, the stops that have already been served are written in light grey; future stops are written in black.

GTFS-Static & GTFS-RT Comparer Report

  • Code: https://github.com/openTdataCH/OJP-Showcase/tree/develop/apps/gtfs-rt-static-report
  • Purpose: This is a visually appealing representation of the comparison report described above. It can be used, for example, to show unusual movements in data volumes. As well as to identify recurring or unusual patterns. Compared to the ‘pure’ comparator, this view provides a monthly overview of the data obtained there.
  • Instructions:
    • First, you can select the month to be visualised and the values to be displayed in comparison. The result is then displayed in the table below, where the values per day and time for each day are displayed. In the picture here, the number of real-time data for the days and times in September 2024. The different shades of blue represent different GTFS datasets.
    • Depending on the selected cell, you can display the details of the data on the right side. The ‘DATA’ tag indicates either server problems or file problems. MATCH means that too many records are different. While ‘RT age’ indicates an RT record that is too temporary. Details can also be read here: https://github.com/openTdataCH/OJP-Showcase/blob/develop/tools/gtfs-rt-static-compare/docs/gtfs-rt-static-compare.md

GTFS Shapes Checker

  • Code: TBC
  • Purpose: Allows to visually validate GTFS shape files (e.g. https://tools.odpch.ch/gtfs-shapes-analyse-v2/data/gtfs-db-lookups-2023-09-05-mentz.json) previously uploaded (by us).
  • Instructions:
    • Either search for a desired trip in the shapes file, or click with the left mouse button on the map – next to the displayed graph shapes, which are visible as blue lines on the map (example highlighted in yellow in the screenshot). All nearby trips are then displayed and you can select one by clicking on a blue button on the right (labelled with the trip ID) to highlight it visually on the map. In addition, details are displayed textually at the bottom right.

Erstellen von Shapes

Für den Umgang mit SIRI Ereignisdaten

SIRI SX Overview

  • With ?debug=1  at the end of the URL you can find more details. When searching for text, you have to enter an SBOID or SSTID (no full-text search)!
  • Code: https://github.com/openTdataCH/siri-sx-situation-monitor
  • Purpose: Displays the event information received in SIRI-SX format as a simple collection.
  • Instructions: There is no special configuration (unless you set ?debug=1)

SIRI SX Map

  • Code: https://github.com/openTdataCH/siri-sx-map?tab=readme-ov-file
  • Purpose: Georeferenced representation of SIRI-SX messages on a map.
  • Instructions:
    • It is a map on which the events are displayed. If you click on the coloured markers or lines, you will get more details about them. You can also select the language and some other parameters for the query and display.

GTFS Query 

  • Code: OJP-Showcase/apps/gtfs-query at develop · openTdataCH/OJP-Showcase (github.com)
  • Purpose: This system makes it possible to display the appropriate GTFS timetable details based on given SIRI-SX event data.
  • Instructions:
    • First, open the SIRI SX Overview tool (see above) with the addition ?debug=1 (at the end of the URL). Then open the developer view with the browser’s network protocol view. Then click on the ‘Build Link’ button. In the request you then make, you will find a link starting with https://tools.odpch.ch/gtfs-rt-status/api/gtfs-query/trips? in the header information (example highlighted in yellow in the screenshot below):

    • If you open this link in your browser, you will see the following view. There you can see the timetable details for the part affected by the incident in GTFS. In the case shown, line 22, which is affected in GTFS for the given date with 59 entries.

How to use the Open Journey Planner

OJP Demo App

  • OJP-1.0: https://opentdatach.github.io/ojp-demo-app/search
  • OJP-1.0 BETA: https://tools.odpch.ch/beta-ojp-demo/search
  • OJP-2.0: https://tools.odpch.ch/ojp-demo-v2/search
  • Purpose: A tool for testing the OJP interface and its functionalities. The app is primarily intended to demonstrate system capabilities and is not intended as a full-fledged app! The app makes it possible to make the typical queries to the OJP system in the OJP standard. This is possible at various endpoints (e.g. testing or integration), each for OJP standard versions 1 and 2. All planned functionalities can be tried out in the BETA version; however, it is often unstable.
  • Instructions:
    • Journey Search
      • The ‘Journey Search’ tab is selected by default and you can perform a classic route search by specifying the start and destination of a desired journey in the ‘From’ and ‘To’. You can also select the desired (multi-)modality of the form of transport, e.g. ‘Mode at End’ and ‘Bicycle Sharing,’ i.e. covering the last mile by bicycle. As described above, this configurability serves as a demonstration – an end-user program would probably handle this differently. You can also set the day and time (departure or arrival). Leave PROD (Production System & Server) with the environments. LA Beta stands for Linking-Alps Beta and makes it possible to test queries as part of the LinkingAlps network (international connections towards South Tyrol/Austria/Slovenia). Click the ‘Debug XML’ button to view the XML request.

      • Once the search has been carried out, further functionalities are available. The ‘XML’ button in the search section can display the request and query XML. In addition, the possible journeys (trips) are now displayed with various meta-information, such as the duration of the journey. The ‘MAP’ button focuses the view on the map on the corresponding journey segment (trip leg). Clicking on the mode (e.g. ‘1st train – …’) has the same effect. Clicking on the line name and train number (e.g. ‘IC6 960’) gives an overview of all the stops on the means of transport. Worth mentioning is the ‘permalink’ button, which allows a predefined request to be saved in a link so that it can be shared later (e.g. to fix bugs). The result also contains information on delays, characteristics of the means of transport, accessibility and a rough price information.
      • The result card behaves as usual elsewhere.
      • Station Board
        • By selecting the ‘Station Board’ tab, the departure/arrival monitor for a specific stop can be displayed. E.g. ‘Bern, Wankdorf Center’. All other functions behave in the same way as for ‘Journey Search’.
        • After the search, the result is displayed with the individual lines, their train/transport numbers, expected arrival/departure times, as well as possible delays.
      • Trip Info
        • The Trip Info tab allows you to call up the detailed view for a specific train. As described above, you can also see this by clicking on the specific line or train number (e.g. IC1 709) in the journey search. This is also the way to obtain a ‘JourneyRef,’ i.e. a Swiss Journey ID (SJYID), e.g. ‘ch:1:sjyid:100001:709-001’ (more on Swiss IDs https://www.oev-info.ch/de/branchenstandard/technische-standards/strukturelle-standards). This SJYID is then entered into the mask.
        • The result shows the different stops during the journey.

API Explorer

  • Code: https://github.com/openTdataCH/api-explorer2
  • Purpose: The API Explorer allows OJP 1.0 and 2.0 requests to be sent to our backend in XML format. It is thus functionally similar to the OJP demo app, but is limited to request types for OJP and a ‘purely textual’ view with XML questions and answers. Appropriate authentication is required (see also https://opentransportdata.swiss/cookbook/verwendung-der-api/).
  • Instructions:
    • A standard Swagger interface provides the endpoints that can be requested, including sample requests.

& More

The following website contains a list of useful tools, especially for handling GTFS data: https://github.com/MobilityData/awesome-transit