Hi !
For my temporal analysis script (again 😀) i’m trying to use rasterstats module to calculate cloud proportion in blocks. To do this I need Affine Transformation of images.
I get cloud mask with a CloudMaskRequest called all_cloud_masks like in s2cloudless example.
for idx, [prob, mask, data] in enumerate(all_cloud_masks):
cloud = zonal_stats(blocks_merge, mask, affine=affine, nodata=-999, add_stats={‘cloud’:cloud_pixel_count})
for the moment I run another WcsRequest to save one image and get affine transformation with rasterio module:
with rasterio.open(pix) as src:
affine = src.transform
But is it possible to get Affine Transformation of masks more simply?
