I use the following workflow right now, but I want to change the subset-part to masking out by an Esri-Shapefile, because the region is even smaller which should safe time in processing.
Would you simply replace the subset-step with Land-/Sea-Masking using the vector as mask?
With best regards,
the Land/Sea-Mast operator does what you need, and you can include the shapefile in the graph as described here: Error in graph builder for subset image through a shape file
But please be aware that this only removes the pixel values outside the vector. The size of the raster will stay the same.
May I ask what the first Write operator is for? I think you can directly connect Subset to Calibration.
So I would not reduce my calculation time for whole images since calibration etc. would still take the same amount of time? I am planning to process whole scenes of S1.
When I first did the graph I always got the error that the input for calibration should be a SAR-Product, using the first Write-operator solved my problem.
It should be less time, because not all pixels need to be re-calculated (some just remain 0 or NaN), but the time to write the file is probably the same. So depending on the subset there can still be an advance.
Strange about the Write operator, haven’t heart of this. But as long as it helps…
Thank you very much for your answers. I will replace the subset with the Land-/Sea-Mask then .
Now I have to get my graph working in the command line but I think this should be possible
Do you know if its possible to get the mean for all masks in an image? I know the right-click -> Export Mask-Pixels version, but is there a way to actually instant calculate the mean for the different masks?
do you mean the values of the mask itself or the pixel values of a raster falling inside the mask?
I’m not sure for both but there might be a solution via the mask manager which allows to combine several masks by logical expressions and mathematical terms.
I have a lot of polygons that i want to export the mean values of a raster in the different polygons. Basically the 2nd approach you mentioned.
If all are polygons to be imported, I don’t know if there is a way to automate it.
As an alterantive, you can open the img files in the .data folder in QGIS and run the zonal statistics tool in batch mode
Thanks for the links! I will have a look into that, maybe thats easier (and faster)!
Edit: Do you happen to know if I can apply a -1/-2 pixel shoreline extension, so basically i want to get rid of the mixed pixels at the border of my polygons.
do you mean negative pixel values or half a pixel?
I would simply give it a try, either entering -2 or 0.5.
I want negative pixels, basically to avoid the possibility of mixed pixels between land and lakes (my polygons). Simply putting -2 or something negative didnt result in a solution.
you could create a negative of your polygon with QGIS difference, basically a polygon of your land area. If you import this one in SNAP and apply buffer pixels, they will be removed instead of added to the lake area.
But that’s only a workaround.
I think I will do it that way, since I only have to do it one time for my whole aoi/a lot of polygons and can use the data afterwards. Will probabaly be faster than figuring another way