I have reprojected the S1A_IW_GRDH_1SSV to UTM/WGS84 by Geometric/Terrain correction. After that I need to creat a subset image by vector using S1-toolbox. How do creat subset image by vector polygon using S1-toolbox?
You can can create a subset using a polygon in WKT format.
You could also mask the data within your vector using the Land/Sea mask operator. It can take as input a vector found in the source product. This would make anything outside your vector no-data-value.
If you source product does not have the vector you need, you can use the vector/import-vector operator to add a shape file to the product.
Subsetting directly from a shape file or source product vector would be useful. I’ll add it to the list of future enhancements.
Hi Iveci can you please provide a step-wise approach to subsetting a raster using vector polygon. I’m using SNAP and I’m able to convert shp to wkt. Thanks
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:
- Import your wkt:
Geometry from WKT
- Take subset (it’ll automatically pick up the wkt):
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?
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?
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.
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.
This is my csv in wkt format.
“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.
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.
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
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.
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
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.
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?