Managing Time in Public Transport Requests
In Timetable Routing, the service provides scheduled transit departure times in the response, based on information provided by public transport companies. The routing engine incorporates a time buffer between walking into the station and the actual transit departure time, known as waitTime
. You can calculate the actual transit departure time by adding the waitTime
shown in the response to the time
associated with the maneuver.
The waitTime
is also included in the overall travelTime
for the route. If you would like to get the journey time only, you must subtract associated waitTime
values from the overall travelTime
.
Calculating Departure Time
{
"position": {...},
"instruction": "...",
"travelTime": 720,
"time": "2013-04-10T11:50:00+02",
"action": "enter",
"waitTime": 60,
"_type": "PublicTransportManeuverType"
}
Calculating Departure Time with a Line Change
waitTime
specifies the amount of time available to change lines. In this example, the journey itself takes only ten minutes. Four minutes waitTime
is required to change the transit line: {
"position": {...},
"instruction": "...",
"travelTime": 600,
"time": "2013-04-10T12:02:00+02",
"action": "change",
"waitTime": 240,
"_type": "PublicTransportManeuverType"
}
Arrival and Departure Guarantees
When you request a public transport route, it is not always possible for the API to strictly follow departure
and arrival
parameters. Due to transit availability, the schedule may start and end later or earlier than the time specified. In such cases, you can use alternative routes to offer more schedule options to your end user.