I am trying to get the ‘scl_water’ mask for every image I process. First I resample and reproject the image and then I run the following code:
mask_group = product.getMaskGroup()
mymask = mask_group.get(‘scl_water’)
my_real_mask = jpy.cast(mymask, Mask)
h = product.getSceneRasterHeight()
w = product.getSceneRasterWidth()
data = np.zeros(w * h, np.int32)
data.shape = h,w
However, every element in data remains 0. I made the same operations with SNAP Desktop and there wasn’t any problem.
Does anyone know what is the problem?