How to mask river/lake?

Hello, everyone!

I just want to ask how to mask out rivers and/or lakes if these are present for a given study area? Unfortunately, I do not have any other ancillary data (i.e. shapefile).

I hope there is a way to mask these water bodies through SNAP.

Thank you in advance for your time.

what data are you using?

calm water is mostly black in radar images and can be extracted with thresholding in the mask manager.

Hi, ABraun!

I am doing radar interferometry using L1 SLC Sentinel-1 SAR data. Attached here the figure of the lake zone that I want to be masked out from the map together with the vertical displacement map with observed movements within the lake zone. I would like to remove it to avoid misinterpretation of the results.

I hope there is a way to mask the lake zone even if I do not have the information about it (i.e. shapefile).

I’ve searched through the forum regarding this concern but there’s not much discussion about it.

Thank you for your assistance.

Please elaborate the technique… I have similar issue

As I suggested, you can

  1. create an intensity image
  2. filter it
  3. apply a threshold to have a binary mask.
  4. terrain correct it
  5. collocate it with your InSAR result
  6. use this mask as a valid pixel experssion in the properties of the displacement bands
  7. once you entered the expression the mask areas will become transparent

It would be even easier to get the lake area as a shapefile (e.g. from OpenStreetMap), import it into the InSAR product and use this as the valid pixel expression.

Hi, ABraun!

Thank you for your two suggestions in order to address my concern. I did the first one with these steps:

  1. Import one SLC product to SNAP.
  2. Apply-Orbit-File
  3. TOPSAR-Split
  4. TOPSAR-Deburst
  5. Multilooking (as I also multilooked the previous outcomes)
  6. Range-Doppler Terrain Correction
  7. Through Pixel Info, I determined the threshold of intensity that I will mask out by ‘binarization’ using the Band Maths.
  8. Band Maths.

Fortunately it worked fine as I was able to mask out the lake areas even though there were some ‘patches’ on my final products.

These ‘patches’ were pixels over land areas that were masked because these pixels did not satisfy the threshold I’ve set.

Anyway, it worked.

I was able to download a shapefile as well but I have little knowledge on how to do your second suggestion after importing the vector data. I do not know what to do with “Use Vector as Mask”.

If you would be very kind to provide us a ‘detailed’ procedure.

Thank you in advance for your assistance and patience.

good to hear that the SAR-based approach works.

To include a vector, you need a geocoded raster product. The vector should have the same coordinate reference system as the raster (as selected in the Range Doppler Terrain Correction), e.g. WGS84.

Select the raster in the Product Explorer and nagivate in the menu >Vector > Import > ESRI Shapefile.
Confirm the subsequent dialogue and wait for the shapefile to load. It will appear under “Vector Data” of your product. Once you save the product (File > Save Product) and re-open it, it will also appear as a mask. You can use the name of the vector in the valid-pixel expression of the raster, for example

lake != 1
or
lake == 0

This will make all pixels which are inside the polygon transparent.

I did what you’ve mentioned here. But after re-opening the product with the ‘Masks’ folder containing one band, under Properties, there’s no ‘Valid-Pixel Expression’. I do not know if I understood well what you have instructed here. Please see attached photo.

you define the valid pixel expression in the band which you want to mask, not in the mask itself.

Ok, I got it now. Another concern is when I export the product to Google Earth for visualization, the polygon is also included masking the lake area. Is there a way that this mask (polygon) not to be included when exporting the product to Google Earth?

Thank you.

the Google Earth export takes the current view of the SNAP GUI. If the pixels are transparent here, they shouldn’t be included in the Google Earth exported image as well.

I think I know how to do it now. Yey!

Thank you for your patience and assistance.

In addition, public domain river/lake shapefile data is available on Natural Earth, should you still wish to also use this data in addition to the SAR-based method.