Bad Request if all points have same latitude or longitude values at elevation request
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"
}
Hi @Brakebein thanks for reporting this. Will have a look, this is a bug. Thanks for providing test data