Land/Sea Mask and Mask Manager-made Masks

Hello everyone,

I tried applying the Land/Sea mask on a ROI, but it failed to nullify the pixel values depicting the area of a harbor. Thus, I tried creating a custom mask using the Mask Manager, but all it seemed to do was colorize the pixels corresponding to the function I used to create the mask, instead of nullifying them like the Land/Sea mask does.

What makes the mask applied from the Land/Sea Mask nullify the pixel values so visibly ?
Am I missing something at how the masks made with Mask Manager are actually applied ?

Thank you in advance for any input !


This is the RGB Natural Colors image of the subset I am using (an area of the Mitylene harbor). It is created from a Sentinel-2 L2A product, resampled to 10m. The elongated white shape on the lower left corner is the part of the harbor that was not processed by the Land/Sea mask as I expected.

This is the same image after applying the Land/Sea mask. While most of the landmass has been masked out properly, the harbor area seems to have remained (Mr gnwiii mentioned below that it might be because of the resolution I am using)

The custom mask I am trying to apply is expressed as (B11>0.0375) and it covers the entirety of the pixels I would like masked out.
Original Image : S2A_MSIL2A_20180607T085601_N0208_R007_T35SMD_20180607T114919

My version is SNAP 8.0.9, Sentinel-2 Toolbox 8.0.7
I am running Windows 8 on the device I am using.

(Thanks to Mr gnwiii for pointing out the extreme lack of information on my original post)

Have you seen the Mask Manager tutorial?

Please provide enough detail so others can reproduce your problem: OS, SNAP version and update status, data set, and processing steps.

If you are working with higher resolutions than the default Land/Sea mask it should not be surprising that relatively small features are mishandled, so creating your own mask is appropriate. If you think there is a defect in the default Land/Sea mask an image would be helpful.

A custom mask is just a definition of pixels.
You have to use it in the valid pixel expression in the band properties.

I see, I had misunderstood their use. Thank you very much !

My apologies, the post was made in a hurry. Thank you for pointing out my ommittance.

So were you able to solve it?

Yes, thank you very much mr. Braun ! I had not realized this is how a custom mask is actually applied on SNAP.

No worries, glad to hear it works.