Open-EO / openeo-spring-driver

openEO driver build on spring using WCPS and ODC storage access
Apache License 2.0
0 stars 0 forks source link

Computing NDVI based on ODC data produces wrong results #51

Closed clausmichele closed 2 years ago

clausmichele commented 3 years ago

Sentinel-2 data is stored as uint16 data. When computing the NDVI, due to an overflow error, the output range is not between 0 and 1 as expected. The solution consist in converting the data to float32 before doing the math operations or at the loading step.

clausmichele commented 3 years ago

Fixed casting the data to np.float32 at the loading step https://github.com/SARScripts/openeo_odc_driver/commit/a10cb6af8004434b52f177a35b86b663b1cca009