SNAP Land/Sea Mask not working on idepix products and Geotiff Processing Limit

Hello,

My first problem: I trying to mask out land and cloud pixels from a resampled S2 image (20m) and processed using idepix. I used the clear water mask vector (from the IDEPIX products) with inversion, but the resulting images have weird values. The first attempt resulted in pixels with 0 values, the second, resulted in pixels with values ranging up to 12000 which does not make sense as the original pixel values were much lower.

The second problem. Whenever I choose Geotiff as output product type, SNAP generates an error saying the number of pixel is exceeded.

I would generally recommend using DIMAP as output of each module until you are done with your analysis. As a very last step, export the DIMAP file as a GeoTiff. The GeoTiff format is however limited to 4 GB:
http://www.gdal.org/frmt_gtiff.html

You can try the BigTiff format as an alternative export.

Regarding the weird values. The raw values are written to the GeoTiff file. You have to consider the quantification value, which is 10000. So divide the values by 10000.
It was not a good decision to do so, but now we have ti deal with it, because changing it could probably break several existing processing chains.

Hi Andreas and Marco,

The Geotiff as last step process works. For using the idepix-generated mask on idepix TOA, I found a solution using
band math expression if then else (@ ? @ : @), e.g., in masking land pixels on B4, lc_land:NaN:B4
Thank you for your help. I appreciate it.

Cheers,
-DDT