How do creat subset image by vector polygon using S1-toolbox?

Hi, I am having similar problem. Do I understand correctly that the subset by WKT is only available in command line?

This is how I take a subset using a wkt polygon:

  1. Import your wkt: Vector -> Geometry from WKT
  2. Take subset (it’ll automatically pick up the wkt): Raster -> Subset -> Spatial Subset -> Geo Coordinates

Does that solve your issue?

Thank you for the answer. But so far I have not succeeded. Is it possible to import WKT with different coordinates than Lat/Long?

I using raster/subset in snap toolbox. I can creat subset image by vector in view window but I can’t export to file.

How can I do?

@leminhhang81
In the menu you can find the File / Export /
Or you can choose Save As.
What difficulties do you exactly have with saving the subset?

@tereza_smejkalova
Currently only Geographic Lat/Lon (WGS_84 ) is supported when importing WKT.
We thought about extending this feature to different CRS before. I have now created an issue (SNAP-323) for this.

OK, thank you for letting me know. I am using the Geographic Lat/Long and it works fine but if I could use the data CRS that would certainly be very useful.

Hi,
I would like to ask, if the Land/Sea mask operator is still working?
Week ago a tried it succesfully with my shp (only problem was that the polygons were not separated).
I divided them to single polygons and tried to mask them individually today with the same procedure and settings, but today nothing happens.The result is the same image as the source.

K.

This is my csv in wkt format.

WKT,
“POLYGON ((12.6097549765447 52.8668438937924,12.7851824981199 52.8655237877037,12.7856684469331 52.8010831718993,12.6099979509513 52.8007893740021,12.6097549765447 52.8668438937924))”

Trying to import it, this error pops up:

Failed to import vector data.
An I/O Error occured:
java.io.IOException: Neither lat/lon nor geometry column provided.

Thanks

Hello,
I’m trying to subset my classification and I followed your suggested process but the subset doesn’t seem to have picked the wkt.




As can be seen from the screen shots I’m still getting only two sets of coordinates though I should have quite a lot.
Am I doing something wrong or there another way (apart from the land/sea mask) I could clip my classification?

What esteban.aguilera wrote is not correct the coordinates of the shape are not considered by the subset.
The land/sea mask is currently the only way.

The land/sea mask keeps giving an error:

these are the details:

Not sure if this helps but if you imported or digitized the vector in SNAP you can try saving the product to physically store it in the product. Then try masking again.

Other probable error sources:

  • topology errors in your vectors (can you please provide a screenshot of it?)
  • vector and raster have no common spatial coverage
  • vector and raster have no common spatial resolution
1 Like

Tried saving the product with the vector first, hasn’t produced any errors so far. Still writing product, I’ll update when it’s done. Thanks. :slight_smile:

Hello guys, so the process was completed. However the result was a grey sale image rather than the coloured classes I wanted clipped.
My procedure was:
-I opened my classified product
-imported the boundary shapefile
-saved the product
-opened the land/sea mask interface and selected the following parameters


-Run
but what I got was this

Looks right to me.
Open the layer manager to hide the vector and only see the clipped raster.
You can furthermore export the color scheme of your original data to a file and apply it to the clipped result.

1 Like

I thing the band lost the index coding which maps the classes to colours.
But this is strange. The index_coding is copied to the resulting product and in the code I also see that it is considered for the band.

Can you provide the product which you use as input to the Land/Sea Mask?

I checked and the index coding was intact so I just saved the colour palette from the original dataset and loaded it in this one as ABraun suggested and it worked.


Thanks marpet and ABraun :slight_smile:

Yes, as workaround it is ok, but it should be fixed in the source code.
It’s almost done, so the fix will be included in the next release.

2 Likes

Good afternoon Sir?

I used the Land/Sea Mask to subset a Sentinel-2A single image.
After performed the Land/Sea Mask. Now, I need to mask some clouds in the image after subset applied. What is the procedure to do so?

Thank you