Snappy ROI problem

Thanks a lot marpet! That worked!

Now I’m encountering another problem though which is the one described in this other thread.

It looks like the mask doesn’t apply and data is full of just zeros.

mymask = maskGroup.get(‘shape’)
my_real_mask = jpy.cast(mymask, Mask)
h = product.getSceneRasterHeight()
w = product.getSceneRasterWidth()
data = np.zeros(w * h, np.int32)
data.shape = h,w
my_real_mask.readPixels(0,0,w,h, data)

Any clues? =(
Furthermore, when using subset instead of the mask how can I specify that all the pixels not belonging to the geometry provided will be put to zero? The geometry of the subset has to be a rectangle (Am I wrong?). I would like to get 0 on all the pixels inside the rectangle that don’t belong to the geometry provided.
From this link it looks like you already provided this feature “User should have the option to set the pixels outside of the region to NaN values” unless I’m misunderstanding it.
Thanks a lot for your avaibility, I’m really going crazy here :stuck_out_tongue: