Hi, I am calling POI service API using the following python script:
def get_poi_data(coordinates, buffer_size=1500):
body = {
"request": "pois",
"geometry": {
"bbox": [
[coordinates[0] - 0.1, coordinates[1] - 0.1],
[coordinates[0] + 0.1, coordinates[1] + 0.1]
],
"geojson": {
"type": "Point",
"coordinates": coordinates
},
"buffer": buffer_size
},
# "limit": 10,
# "filters": {
# "category_group_ids": [133, 151, 153, 156, 157, 191, 192, 202, 203, 204,
# 206, 208, 280, 283, 288, 292, 518, 587, 588, 604, 605]
# }
}
headers = {
'Accept': 'application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8',
'Authorization': ORS_KEY,
'Content-Type': 'application/json; charset=utf-8'
}
response = requests.post('https://api.openrouteservice.org/pois', json=body, headers=headers)
print(response.text) # Print the raw response data to verify
But then I am getting
{"type": "FeatureCollection", "bbox": [], "features": [], "information": {"attribution": "openrouteservice.org | OpenStreetMap contributors", "version": "0.1", "timestamp": 1695216871, "query": {"request": "pois", "geometry": {"bbox": [[145.114306, -37.8271547], [145.13430599999998, -37.807154700000005]], "geojson": {"type": "Point", "coordinates": [-37.8171547, 145.124306]}, "buffer": 2000}}}}
I am getting an empty bbox and features for all coordinates I tried.
I tried swapping longitude and latitude it didn’t work.
Can anyone tell me if I have some issues in my API calling code or OpenRouteService POI does not support Australian POI finding?
Many thanks,
Tim