AgroDataCube / api-v1

AgroDataCube API service Version 1 - A newer version is in use now.
1 stars 0 forks source link

Errors in response for AHN related API request #5

Closed robknapen closed 2 years ago

robknapen commented 6 years ago

The request:

https://agrodatacube.wur.nl/api/v1/rest/ahn?geometry=POLYGON((%20164685%20451073,%20184119%20451073,%20184119%20433332,%20164685%20433332,%20164685%20451073%20))&epsg=28992

Returns this response:

{
  "type": "FeatureCollection",
  "features": [{
    "type": "Feature",
    "geometry": null,
    "properties": {
      "sum": "552380",
      "sum": 4.9978837E8,
      "mean": 904.7908505014664,
      "min": -9999.0,
      "max": 6191.0
    }
  }]
}

Looks like a number of issues, e.g. geometry is null, instead of the geometry specified in the request. There are two "sum" keys in the properties, one has a text value. And the "min" value is -9999.0, which I guess is the No Data value instead of a real altitude. The "mean" value is expressed with too many digits (beyond the actual accuracy of the height).

yke commented 6 years ago

On march 28 this result returned

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": null,
      "properties": {
        "sum": 499788370,
        "mean": 904.7908505014664,
        "min": -9999,
        "max": 6191
      }
    }
  ]
}

Singele sum so it is solved.

robknapen commented 6 years ago

Min is still -9999 (nodata?) and the mean has tooooo many digits...

robknapen commented 6 years ago

Isn’t the sum a useless property and better left out of the result?

yke commented 6 years ago

Replace the result this by a geotiff

zoot-inge commented 6 years ago

is case for reproducing and expected behaviour clear enough?

yke commented 6 years ago

Test:

http://localhost:8084/api/v1/rest/ahn?geometry=polygon((174098.355412451 444323.980737271, 174098.355412451 449323.980737271, 179098.355412451 449323.980737271,179098.355412451 444323.980737271,174098.355412451 444323.980737271))

Resulted in

{
    "type": "FeatureCollection",
    "features": [{
        "type": "Feature",
        "geometry": null,
        "properties": {
            "area": 2.5E7,
            "mean": "2875.168",
            "min": -9999.0,
            "max": 5534.0
        }
    }]
}
yke commented 6 years ago

he min -9999 is due to the resources used. To be solved.

yke commented 6 years ago

Replace the AHN raster by the AHN2_5m raster,

For api/v1/rest/ahn?geometry=polygon((174098.355412451 444323.980737271, 174098.355412451 449323.980737271, 179098.355412451 449323.980737271,179098.355412451 444323.980737271,174098.355412451 444323.980737271)) that returns

{
    "type": "FeatureCollection",
    "features": [{
        "type": "Feature",
        "geometry": null,
        "properties": {
            "area": 2.5E7,
            "mean": 29.464,
            "min": 9.152000427246094,
            "max": 55.87200164794922
        }
    }]
}
robknapen commented 6 years ago

Incomplete? Moving to next milestone.

yke commented 2 years ago

Should be solved in V2