Clip raster file using Shapefile

I think the problem is the “-” in the filename of the shapefile. Save it under a more simple name (“clip.shp”), import the shapefile again into the product, save the product and then try masking again.

Thanks your advices,the SAR images was clip well.

Hello marpet,
I am trying to clip my study area from the entire scene. I am trying to find the “WKT from Geometry” but the option is not active by right click on the scene. Please help me with this.
Attaching the screenshot for your reference.

WKT from geometry gives you the coordinates of the polygon vertices, not the pixel values.

If you want to exclude all pixels outside the vector you can simply use the valid pixel expression of your band and enter the name of the vector as an expression.
For example: You have a radar image band Sigma0_VV and imported the polygon AOI
Now you open the band properties of Sigma0_VV and enter AOI in the valid pixel expression. This will remove all pixels outside the polygon from the band, but only works inside SNAP

If you want to permanently clip the values, you have to use the Mask Land/Sea operator as explained above.

You first need to select the geometry you want to get the WKT for.
The geometry will have a yellow border when selected.


sorry, I misinterpreted the question, and @marpet is right: When you want to extract the WKT coordinates for clipping, the solution is to select the polygon first.

1 Like

Thank you Sir.

Thank you sir

I tried this and it worked, thank you for the insights

You first need to select the geometry you want to get the WKT for.