Reading data from boolean OLCI product Masks using snappy

Ah ok. The reason for the error is that Python doesn’t know that mymask is a Mask.
In Java mask_group.get(...) returns a ProductNode<Mask>. This information gets lost in Python.
It should be possible to cast it to a Mask.

from snappy import Mask
my_real_mask = jpy.cast(myMask, Mask)

Afterwards it should be possible to call readPixels on my_real_mask.

2 Likes