6

Context: I'm working on a logical problem as part of my Msc. thesis in GIS. I want to calculate the departure time (output) based on a desired arrival time (input). I have chosen to use an API to outsource much of the coding and maintenance.

Current Problem: Tried to use the Google Distance Matrix and Google Diretions API's. Both do not allow a travel mode of driving combined with an arrival time as input.

Question: What API can be used with the (batch size 1 - 50) input of a desired arrival time (/datetime) and a transport mode of driving to give an estimated departure time/travel duration taking into account traffic conditions such as rush-hour?

Related Posts:

API - Travel time based on arrival time | No clear answer is given here

Google Maps Directions API - Arrival time? | 2500+ views on stackoverflow since 2.5 years, no clear answer yet. One of the comments mentions the HERE API, but their documentation suggests it is not possible. See the note in the below picture.

After Taras Comment: Looking for free web service that calculates driving distance between 2 addresses | Question is about driving time, not driving time based on desired arrival time per se. Bing maps, google maps, HERE maps, and arcgis are recommended. As far as I have been able to find, these do not allow for specifying the 'desired arrival time' (except for public transport).

REST calculateroute want to supply arrival time to determine when to depart | Question from 2012 about the same problem, but specific for the HERE maps API. Answered on 4 oct 2018 (6 year later?) that only public transport modality is supported for now.

enter image description here

LMB
  • 1,166
  • 8
  • 27

2 Answers2

0

using the travelTime platform's api you can do 'arrival_searches'- which let you 'arrive at a destination no later than a given time' - it takes the the mode of transport, start and end points as input

since it returns a travel_time property, calculating the departure time would simply be subtracting the travel time from your arrival time

it appears that you can specify upto 10 searches at a time, but if you have 50 you want to process (i'm assuming this is what you mean by batch) , you could submit several requests

api documentation here:

http://docs.traveltimeplatform.com/reference/routes/

weaverk
  • 138
  • 1
  • 9
  • This indeed looks more like it. Although your answer showed me that I left out a crucial bit of information in my question (which i just eddited), the routing has to account for predicted traffic conditions such as rush hour. It seems like the travelTime platform does not account for traffic conditions (at least is not excplicitly stated on their site) – LMB Nov 18 '18 at 11:26
0

Mapbox’s directions API allows you to specify arrival time and accounts for historical traffic conditions. As suggested above you can then work backwards from the arrival time and estimated trip length to get the suggested departure.

https://docs.mapbox.com/api/navigation/directions/

fishmulch
  • 116
  • 3