Hi all,
I am trying to perform a rather simple operation, yet I struggle to implement it with the openeo python API.
I have a DataCube from SENTINEL1_GRD
collection, which passes through the sar_backscatter
function. I noticed that resulting bands are float32 when downloaded in NetCDF, which eats bandwidth and storage. I want to cast those values to int16. I therefore would like to apply clipping / scaling of VV
and VH
bands, and a different clipping / scaling to the local_incidence_angle
(because it has a different dynamic range). And then I would like to ensure that everything casts to int16.
I ran into the following:
- local_incidence_angle is not recognized as an ouptut band of the sar_backscatter function (but it exists when downloading the NetCDF). I therefore can not isolate it in a separate DataCube with
filter_bands
- I can only scale the whole DataCube through the
linear_scale_range
, which applies the same scaling to all bands - If I isolate VV and VH through
filter_bands
, I can scale them separately but then I can not merge into a single DataCube withmerge_cubes
because I can not isolate local_incidence_angle withfilter_bands
- I can cast to int with apply(processes.int) but I do not know how to ensure int16.
The same issue applies to viewing and sun incidence angles in SENTINEL2_L2A collection. The angles gets casted to int16 in the final NetCDF, which discards most of their dynamic.I would like to scale them before downloading but I run into the same kind of troubles.
Do you have an idea on how to do this ?
Thanks a lot for your help,