Topics:

Getting started

Sometimes public transport does not work according to timetables. Vehicles may arrive earlier or later than expected or not at all. In a situation like that the real-time information can be very useful.

Glossary

Term Explanation
Real-time information An umbrella term for data that is based on vehicle movements and alerts generated by human operators and automatic systems (data received with no delay).
Vehicle position Vehicle’s real geographic position, represented by latitude and longitude.
Real-time prediction Based on vehicle’s planner route and its current position some system makes a prediction when vehicle really arrives to some point.
Service alert A description about a disruption that happens in public transport.
GTFS-Realtime (or GTFS-RT) A standard for transportation agencies to provide real-time updates about their fleet.

GTFS-Realtime

GTFS-Realtime (or GTFS-RT) provides three kinds of feeds:

Our goal is to provide GTFS-RT feeds for you.

Real-time predictions are available in the Routing API

Real-time data is read into the Routing API. This means that the Routing API returns results that contain predictions. You can read more about that at the Routing API pages.

Situation of the API

Situation at HSL

The current Digitransit implementation is a "partially working solution" built on top of legacy APIs. This means that:

  • Not all vehicles have real-time information available
  • There might be errors in the real-time data

Note: This is not the final solution. In the near future new ticketing and information system will replace all legacy components related to HSL real-time. This transition will improve situation considerably. Read more at:

https://www.hsl.fi/lippu-ja-informaatiojarjestelma

If you are really interested in implementing real-time features, you should look at Digitransit-ui and its source code. That way you can get an idea how real-time is used there.

Situation at the Finnish Transport Agency

Currently, FTA provides real-time information for trains at https://rata.digitraffic.fi/api/v1/doc/index.html. We have a simple wrapper (raildigiraffic2gtfsrt) that transforms that data to GTFS-RT trip updates.

The Finnish Transport Agency is investigating the possibility to build a national real-time service which would collect real-time data from all around Finland.

Situation in other cities

We don't have much control over the other cities and the data they provide, but we have integrated data from Oulu for example, just to see how it behaves.