Could not find point within a radius of 350.0 meters

Hi
for the following coordinats

lng1= -82.83134351407003
lat1=51.55067242637449
lng2-92.46758236101581
lat244.28117641093738

when i tried to send them to the backend via a url includes the api-key, i received the following error message
Could not find point 0: 9.5777162 43.0298891 within a radius of 350.0 meters.

the coordinates provided are in the following order
lng1,lat1,lng2,lat2

please let me know how to fix this issue

Hey,

distance between two points on earth can be calculated using the Haversine Formula.

Aside from that, please do as the “New Topic”-Button in this forum requests:

  • search the forum for similar topics

If there are none, please

  • describe the problem precisely and include full request URLs / bodies and responses in code format (three backticks)
  • make sure your API key is replaced by xxx or api-key or any other placeholder

This will make sure our staff doesn’t answer every question thrice and makes it easier for them to actually investigate your problem.

Best regards,
Jakob

1 Like

the distance is included in the json file which is the response from the backend

i modified the question

Hey,

The coordinates you provided as lng1,lat1,lng2,lat2 don’t seem to have anything in common with the coordinate that is giving you the error, as they are vastly different.

Thus, as stated above, please provide the complete request you sent, along with the complete answer you got.

Best regards,
Jakob

hey
thanks for the reply
the coordinates were obtained from the map via mouse clicks so each time the user clicks the mouse the coordinates are taken and sent to the backend.

would you please tell me what do you mean by vastly different?
moreover, distance it self is not that important, the most important to me is to receive the response from openrouteservice

there are basically two ways to use openrouteservice:
1 - create an application that uses openrouteservice API.
You have to develop something that will run a request and get some response.
2 - use our maps client (that internally uses openrouteservice API) to find places, calculate directions and isochrones.

So, what is the method you are using?

To be able to help you, it is important that you tell us, step-by-step, how to reproduce your case (if you are using the maps client) or the request code if you are using the API directly.

You can use also our Interactive documentation (API playground) to get technical details about the API Dashboard | ORS

Amon

1 Like

hi
@jschnell @amoncaldas i modified my reply a bit.

i am using openrouteservice for the purpose you mentioned in point 1”for getting directions” .mainly I am looking for the direction and it is included in the geojson response with full data profile.
i just send a url with the api key and the start and end coordinates and i receive a json file with various info about the route between the start and end coordinates specified in the url
would you please provide a solution to this issue? why i receive such a message from the backend?

Hey,
without the actual URL you send and the response you get, we can only speculate about the reason why you are receiving this error, as we cannot reproduce your problem.

What I meant by the coordinates being vastly different is, that the coordinates you send to the backend (lng1,lat1,lng2,lat2) are somewhere in North America, while the coordinate that the backend is sending back (point 0) is somewhere in Europe.
This leads me to believe that some error happened when copy-pasting
That is why it is important for us to get the actual request you send (full URL, without api-key), so we can reproduce the problem and see what’s going on.

3 Likes

hi @jschnell @amoncaldas
thank you for the reply. as you requested, here is the error i get:
https://api.openrouteservice.org/v2/directions/driving-car?api_key=key&start=-82.83134351407003,51.55067242637449&end=-92.46758236101581,44.28117641093738

other falsey coordinates:
10.566048387096759
49.348561378171496
18.966871997254607
47.54600895612862

regards

Hey,

thanks for posting the complete request.
I’m sorry if my last reply was unclearly formulated - by stating

I didn’t mean to ask for two different URLs, one containing the api-key and one not, but for a single one that contains a placeholder instead of the key or no key at all, as stated here:

As to not have your api-key exposed to the public, I have edited your reply and hidden the revision so that it no longer contains your key. As the second URL got redundant by doing so, I have removed it as well.

On to your question:
This is a common issue with rural or under-mapped regions:

I’d recommend actually choosing points that are routable to, that have some kind of path leading to them.

Best regards,
Jakob

@jschnell @amoncaldas
hi

would you please tell me how to expand the search radius?

kind regards

Hey,

as stated above, you can use the radiuses-parameter to expand your search radius.
However, this is not possible using a GET-request like the one you provided earlier.

You’ll have to issue a POST-request to do so.
You can find all the information about this in our API-documentation.

For more information about the different body-parameters, click on the ?-icon at the right.
If you scroll down after having selected your desired endpoint, you can look at example code in various languages.

Best regards,
Jakob

Hi,
I also have the same issue. My params are as follows

{“coordinates”:[[11.174931120562666, 75.83476320423199],[11.171264605659482, 75.84032574630943]],“radiuses”:[8000, 8000]}

but I am getting the error message

“error”: {
“code”: 2010,
“message”: “Could not find point 0: 11.1749311 75.8347632 within a radius of 8000.0 meters.; Could not find point 1: 11.1712646 75.8403257 within a radius of 8000.0 meters.”
},

I am posting data to https://api.openrouteservice.org/v2/directions/driving-car

Could you please tell me what I am doing wrong

You are using the wrong coordinate order. Our API takes Lon,Lat.

1 Like

Thank you :slight_smile:
It worked!!