Open
Description
Describe the bug
I am using the API to request the elevation of multiple points (https://api.elevationapi.com/api/elevation/points). In certain cases where the set of points all feature either the same latitude or the same longitude, the request returns 400 Bad Request with "Invalid coordinates, check if lat/long are not inverted".
To Reproduce
POST request to https://api.elevationapi.com/api/elevation/points
with JSON body:
{
"points": {
"type": "MultiPoint",
"coordinates": [
[13.618584, 51.084439],
[13.618584, 51.084450],
[13.618584, 51.084460]
]
},
"dataSetName": "FABDEM"
}
Notice that all longitude values are the same.
Expected behavior
No Bad Request, but getting the points enhanced with the elevation.
Additional context
As soon some additional point is added that breaks the row of same latitude/longitude values, it works fine.
{
"points": {
"type": "MultiPoint",
"coordinates": [
[13.618584, 51.084439],
[13.618584, 51.084450],
[13.618584, 51.084460],
[13.610859, 51.098051]
]
},
"dataSetName": "FABDEM"
}
You also get 400 Bad Request, if only one point is defined.
{
"points": {
"type": "MultiPoint",
"coordinates": [
[13.618584, 51.084439]
]
},
"dataSetName": "FABDEM"
}
Metadata
Metadata
Assignees
Labels
No labels