Routing problem via API - Route arrival times wrong


I have a problem with route ID iFZf3SrA

This is my request, we are not using any conditions like servicetimes or anything:

[{“lat”:“48.3096043”,“lng”:“14.3181279”,“address”:“Start”}, {“lat”:“47.27326”,“lng”:“14.40308”,“address”:“24”},
{“lat”:“47.911667”,“lng”:“17.015556”,“address”:“40”}, {“lat”:“48.516389”,“lng”:“16.483611”,“address”:“39”}, {“lat”:“47.952301025390625”,“lng”:“14.49020004272461”,“address”:“5”}, {“lat”:“48.3096043”,“lng”:“14.3181279”,“address”:“End”}]

This gives me the feasible route:
0 - “Start”
1 - “24”, distance 169, arrival 128
2 - “5”, distance 293, arrival 263
3 - “40” distance 481, arrival 5913 (?)
4 - “39” distance 559, arrival 8256 (?)
5 - “End” distance 801, arrival 8406

I didn’t find a way to debug this somehow myself by using the website because I can’t use lat/lon values (or can I?) or use the routeId provided.

Do you have any idea what causes this issue? It’s just a timing problem, the kilometers seem fine but there has to be some issue why a 200km drive suddently takes almost 4 days. The next stop is weird as well. Drive to end seems fine again.

It seems that location “40” is not routable, that is not reachable via the road network by the vehicle. We’ve imported your JSON on the website and created the route to show the problem:


When a location is not routable, the fallback is used: straight lines as the crow flies and walking speed. While this works well for locations close to each other, it gives huge travel times in this case. The solution is to change the coordinates and so the stop is moved to the closest road.

Our routes are based on OpenStreetMap data. If you have local knowledge and have improvements for the roads, you can also edit the map

1 Like

I thought so, is there some way for me to import this json in the website? Then I could trace the error if this occurs more often.

Also is there some flag in the return value that shows me that something went wrong? Otherwise I can’t programmatically check if there is an issue with the specific place.

You can use the Import button on the website, it accepts JSON. Make sure it is correctly formatted though, it is very picky.

The API does not indicate unroutable locations. A workaround could be to calculate average speed between two stops using the arrival time and distance. When it’s 5 km/hr or lower you can be pretty sure the fallback was used.

Probably why it didn’t work the first time i used it.

Good workaround, thank you!