Open-EO / openeo-geopyspark-driver

OpenEO driver for GeoPySpark (Geotrellis)
Apache License 2.0
26 stars 4 forks source link

FRACTIONAL_SNOW_COVER in Terrascope backend wrongly maps value 0 to NoData #602

Open soxofaan opened 9 months ago

soxofaan commented 9 months ago

(this issue came up while looking into https://discuss.eodc.eu/t/passing-user-defined-parameters-to-an-udf/658)

Terrascope openeo backend now provides FRACTIONAL_SNOW_COVER (only openeo-dev.vito.be at the moment). This collection is also available on SentinelHub openeo backend (and on openeo platform because of that).

Values are in percent, ranging from 0 to 100 (and value 205 for clouds I think). The terrascope backend however returns the data with value 0 mapped to NoData. SentinelHub backend returns data correctly.

reproduction example:

import openeo

temporal_extent = ["2020-04-01", "2020-04-02"]
spatial_extent = {"west": 11.2, "east": 11.3, "south": 47.15, "north": 47.20}
bands = ["FSCTOC"]

con_sh = openeo.connect("https://jjdxlu8vwl.execute-api.eu-central-1.amazonaws.com/production/")
con_sh.authenticate_oidc()

raw_sh = con_sh.load_collection("FRACTIONAL_SNOW_COVER", temporal_extent=temporal_extent, spatial_extent=spatial_extent, bands=bands)
raw_sh.download("raw-sh.tiff")

con_ts = openeo.connect("openeo-dev.vito.be")
con_ts.authenticate_oidc()

raw_ts = con_ts.load_collection("FRACTIONAL_SNOW_COVER", temporal_extent=temporal_extent, spatial_extent=spatial_extent, bands=bands)
raw_ts.download("raw-ts.tiff")

plotting the result side by side shows nodata (white) in the terrascope result, instead of 0 (purple) like in SentinelHub result"

image

soxofaan commented 9 months ago

related to or duplicate of https://github.com/Open-EO/openeo-geopyspark-driver/issues/514 ?