Clip raster file using Shapefile

Greetings!

How can I clip a part of image using shapefile in SNAP?

Thanks in advance

Would you please to take a look at the whole of the following topic,

The raster file is not visible only the top vector file is!

Re-import your raster file, might be itself has problem?

I have mosaiced the 4 scenes using ENVI. Now i need to get the central part of the mosaiced(.hdr) file.

i tried re-importing also

Try to mosaic in SNAP, OR it is not possible?

How to mosaic in SNAP

Type ‘mosaic’ in the search box in the upper right.
Regarding the subsetting, select the geometry in the view and then chose from the context menu ‘WKT from Geometry’.
This WKT string can then be used with the subset operator on the command line.


Also the thread @falahfakhri mentioned will help you.

The mask ‘jnaita_block_5’ is shown in the background, but I guess it is all 0.
What about the Mosaic bands?

it didnt subset the mosaic bands and yes it is all zero

So I think the data is read well within SNAP. Or do you expect other values?
What do you mean by “it didn’t subset the mosaic bands”? What is it? What have you done to create the subset?

I have mosaiced four scenes in ENVI. When I used the vector file to clip the mosaiced images, the result appeared was as in this comment above

And you did the clipping in SNAP or in ENVI?
How does the command line call look like or the?
Please give a some more details about what you are doing. Otherwise it is hard to help you.

I tried clipping in SNAP using Graph builder as

Read > Import-Vector > Write

‘Import Vector’ imports only the vector data into the product. Try the Subset operator and specify the WKT text string as region.

I am not sure if I can see correctly the image. But aren’t you visualizing masks? Mask show only the vectors.If you will visualize from folder Bands it should visualize raster. And for clipping try Land/Sea Mask module.

1 Like

hi,I had the same matter ,did you work your matters now ?
when I clip the SAR image with S1 tools what occured as follows:

Hi!
As I can see from the screenshot, you have not opened the image in the framework.

  1. You first have to open the image (which you want to subset).
  2. Then click on the image( in the product explorer) and import the vector file.
  3. Use Land/Sea Mask tool to subset.

I hope this solves the issue.

Thank you for your quick reply.I had already opened the shape file and SAR image as follows,however the Land/sea mask cannot work ethier.

Could you give me some advices step by step to clip the study area?