Development server gives error with other .osm files

Hi people,

I am working with distance matrix API for a while and I had no problem while the data is around city center of Istanbul. Now I need to work on suburban side of the city but whenever I sent request to my local API, I get
API call status code: 404
Error: 404
Source points [0,…] out of bounds error
I didn’t mix up latitudes and longitudes because I have been using the same file to send request. The area that I try to work on is within the bounds of the .osm file. I tried to work on turkey.osm but even that didn’t help me. Does anyone have any info about this situation? Or better, a solution?

Hey,

could you share the file you are using (possibly as a link from geofabrik) as well as the request you are sending (possibly in cURL-format, see the examples in our API playground)?

That’ll make it way easier to see what is going on :slight_smile:

Best regards

Hey,

https://download.geofabrik.de/europe/turkey.html

This is the link for data. I also have downloaded a smaller portion of this data by using BBBike but neither of them help me about the area that I’ve mentioned.

url -X POST “http://localhost:8082/ors/v2/matrix/foot-walking
-H “Accept: application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8”
-H “Content-Type: application/json; charset=utf-8”
-d ‘{“locations”:[[lon_value_1, lat_value_1], [lon_value_2, lat_value_2], … ]}’

I told ChatGPT to convert my Python code to cURL.

body = {“locations”: locations}

headers = {
‘Accept’: ‘application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8’,
‘Content-Type’: ‘application/json; charset=utf-8’
}

try:
call = requests.post(‘http://localhost:8082/ors/v2/matrix/foot-walking’, json=body, headers=headers)
print(f"API call status code: {call.status_code}“)
if call.status_code != 200:
print(f"Error: {call.status_code} {call.reason}”)
print(call.text)
exit()
except Exception as e:
print(f"Error making API request: {e}")
exit()

This is the Python code. It works when I run the code with a different dataset, same format (.xlsx), same column names etc.

This is a snippet from problematic dataset
41.132467, 28.455700
41.131543, 28.455952
41.129994, 28.457226

This is a snippet from a dataset that I can work on
40.976505, 28.804295
40.975057, 28.803322
40.974616, 28.802097

I hope these help. If not, I will be happy to share more detailed information.

Best regards.