Directions Failing when It Should Not

Hello,

I’m currently experiencing an error when i try to get directions from one coord to another. The error claims that there is no path within 350 m from the coords. However i made sure that there was a path exactly on the coords given (I did that with your Map tool on your website).

On the website it does give me directions, and everything Works fine. However, when i try that on code (even on you website where i can test your functions) i get the error code 2010: basically that point is inaccessible. What could be happening?

The following are the coords and the code i tried:

import openrouteservice
 
coords = ((7.118881, -73.24379),
          (7.123165, -73.237953),
          (7.117421, -73.224521))
 
client = openrouteservice.Client(key=”my-api-key-was-here”) # Specify your personal API key
routes = client.directions(coords, profile='cycling-regular', optimize_waypoints=True)
 
routes

Website map result (it gives a route):
image

The error i got:

ApiError: 404 ({'error': {'code': 2010, 'message': 'Could not find point 0: 7.1188810 -73.2437900 within a radius of 350.0 meters.; Could not find point 1: 7.1231650 -73.2379530 within a radius of 350.0 meters.'}, 'info': {'engine': {'version': '6.0.0', 'build_date': '2020-01-16T14:21:32Z'}, 'timestamp': 1583501285489}})

What’s going on? I also tried changing the profile param. but it does not make a difference on the error received.

Thank you for reading :grin:

Memo.

Hi @Memo_Esquivel,
Please be aware of the lat-lon-order. Although the webinterface, takes lat,lon, the api as well as the python sdk use lon,lat.
The webinterface internally switches the coordinates to [[-73.24379,7.118881],[-73.237953,7.123165],[-73.224521,7.117421]]

2 posts were split to a new topic: Shortest route for multiple points