Struggling with the limitation of 350 m - radiuses in directions

Hi,

I have spent now several hours on finding a solution for this issue, but can’t help it. Even in your forum - there I could not find a satifying answer to that.

This is it, by example:

Starting point:
x= 8.35390876858379
y= 47.34214115258564

End point: differs, but as an example, a failing one, obviously
a = 8.7286082
b = 46.4786826

Part of the code, that is relevant:

coords = ((x,y),(a,b))
res = client.directions(coords,validate=True, radiuses[-1])
geometry = client.directions(coords)[‘routes’][0][‘geometry’]
decoded = convert.decode_polyline(geometry)
dista = str(round(res[‘routes’][0][‘summary’][‘distance’]/1000,1))


The following error occus sometimes, sometimes not… - obiously depending on the end point…

ApiError: 404 ({‘error’: {‘code’: 2010, ‘message’: ‘Could not find routable point within a radius of 350.0 meters of specified coordinate 1: 8.7286082 46.4786826.’}, ‘info’: {‘engine’: {‘version’: ‘6.7.0’, ‘build_date’: ‘2022-02-18T19:37:41Z’}, ‘timestamp’: 1660057504091}})


I am aware, that this might be a bit more than 350 m off the road, but the “radiuses=[-1]” should prevent from this error. Google maps on the other hand says its just about 300 m from the next address known (46.49176309499857, 8.736428096021648)

My questions:

  1. how could I resolve this?
  2. is there a way to catch the error before it crashes?

What is the exact request you are making? If I use profile foot-hiking, I get a response, even without specifying radius. Using any of the car profiles obviously won’t get you response, since cars can’t get to the hiking paths near Lago Tremorgio. So this:

is not complete. Much more info is needed…

Before what crashes? What is “it”? Nothing crashes for me, I just get an HTTP-404 with a nice explanation of what is wrong when I use any car-based profile. You should always check your HTTP-response codes anyway, and depending on the response code you can take action. But since you’re not showing what you use and how you are using it, I can’t give you much more advice than that.

Thanx so far,

I need to use the “car” route and would expect a nearby point instead that is available for cars.

I am using python and woul like to catch the “HTTP-404” or check it, respectively

then you’ll need to set your radius at at least 1500 meter, as far as I can tell, possibly even a bit more - if such a large radius is allowed (not sure what the maximum for radius is, never use it myself). Your endpoint is on the side of the Cima di Filo mountain, so anything near there is only trails. To be exact:those dotted lines are classified as path, with the tag sac_scale=mountain_hiking, so ORS is never going to consider that when your profile is driving-car…
And that Strada di Rodi is at least 1400 meters away from your endpoint. It doesn’t matter what google maps says, because that isn’t used.

I don’t know python, so I wouldn’t have no idea on how to do that. However a quick google search on “python check http response code” gives me plenty of results, so you should be able to find something…

Used to have similar problem routing from some places like San Antonio,Texas on car profile. Setting the radius parameter to -1(Maximum) solved the issue for me.

1 Like