Merging two Sentinel-3 L2 images without losing the masks


I am trying to merge to images/dataset S3 L2 (marine product) that overlap. I wanna do the exact same operation as the mosaicing tool, but I want to keep the existing masks. Is there a way to do that?

Thank you.

That’s not well possible with the mosaic tool.
Because in overlapping regions the mask can be different and averaging masks is not possible.
But you could add the masks anyway to your variables. In the overlapping areas where the mask value are different you get values between 0 and 1. What you do with these values is then up to you.
But these results are not straightforward usable as mask. But from the created band you can generate a mask.
I can also imagine no other solution at the moment.

Hi @marpet,
Why can’t masks just be mosaiced by specifying a logical operator like AND or OR?
In my case I try to mosaic L2 products which where processed by IDEPIX.

Masks would need to be treated special in the mosaic. This is not implemented. That’s the simple reason.
The mosaic always averages values. If you have 8 inputs, 5 marked as land and 3 not, then the result will be 0.6. In your mosaic you can then consider it as land or mixed.