GSC Next departure time

Piergiorgio edited this page Apr 20, 2016 · 10 revisions

Next departure time service

Description

Processing and visualisation of next departure time (as scheduled at bus stop) or estimated time to arrive (based on real-time data) of public transport vehicles. This functionality is aiming at providing information about public transport based on two different sources:

  • from GTFS data, available from the local public transport service, with information about the scheduled time of arrival at bus stop
  • from the real-time bus positioning service, based on the SIRI standard

Work done

Development completed

Work remaining

Integrated test

Current issues

Real-time data examples not yet available

Details

Processing and visualisation of next departure time (as scheduled at bus stop) or estimated time to arrive (based on real-time data) of public transport vehicles. This functionality is aiming at providing real-time information about public transport based on two different sources:

  • from GTFS data, available from the local public transport service, with information about the scheduled time of arrival at bus stop
  • from the real-time bus positioning service, based on the SIRI standard

The goal of this service is to provide information nearby public transport next departure times in a certain area at a given moment in time.

The first step in order to access this information, is to retrieve all stops within a certain area. That is why users have to specify two mandatory service parameters for this service: lon and lat. Those parameters represent the coordinate of the starting point of the service research for stops. It is also possible to specify the extent of the research through the buffer parameter, which however is not mandatory, and defaults to a value of 500 meters when it is not included in the request.

Once the service has gathered information about all nearby stops, it calculates for each of them which lines pass through that stop and their schedules. Then it takes into account only the first scheduled departure time for each of the lines, checking also if it satisfies a time constraint. To achieve this we need some other important request parameters: date, time , and timeOffset. The first two combined give us an exact moment in time, the latter is the margin of time that is needed to reach the stop from the starting point. Therefore the service checks if the departure time satisfies the following relation: date+time < departureTime <date+time+timeOffset. Every departure time. So for each of the identified lines of each vertex at most one departure time,will be taken into account; the one (if any) which is just after the given time bounds. Those parameters anyway are not mandatory: if both date and time are not included in the request the service will consider the current time, while an error is thrown if just one of them is passed. TimeOffset default value is 30 minutes.

The last parameter that can be provided in the request is the lineNumber: it is an optional parameter, and if it is specified it will just consider the given public transportation line.

To sum everything up here is the complete list of parameters that can be passed in the request:

  • lon : mandatory | the longitude of the starting point coordinate.
  • lat : mandatory | the latitude of the starting point coordinate.
  • buffer : optional | default = 500mt. | Defines the research area.
  • date : mandatory if time parameter is in the request | defaults = current time | time of interest
  • time : mandatory if date parameter is in the request | defaults = current time | time of interest
  • timeOffset : optional | default = 30 min | After this time no more departure times will be taken
  • lineNumber : optional | the lineNumbers of interest

A sample request for the nextDepartureTime request is :

http://hub.geosmartcity.eu/otp/routers/default/nextDepartureTime?lat=60.45199075564314&lon=22.264609336853027&buffer=72&time=11:45am&date=12-17-2015&timeOffset=15&lineNumber=21

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.