Subset using Vector file

To have it “rotated” you probably need to reproject to WGS84 grid.

Yes that’s what I did, after geocoding the image everything is fine! :slight_smile: thank you!

Hi @marpet, sorry to bother you again but I have another problem with my subsets:
when I geocode the images and then I execute the subset (using ‘geoRegion’ option and with the same shape for every image) everythin goes fine except that, due to little geocoding errors (within the dimension of a pixel), the subseted images are of different sizes.
I’ll explain better with the following picture:

I got this picture by synchronizing views and cursors of 4 images in SNAP GUI.
The bottom images ([3] and [4]) are the subset of the upper ones([1] and [2], with subset area the mask you see over the top images) whereas left and right side represent different sensing dates.
Now due to the little difference in the subset mask position over the geocoded images [1] and [2], you can see that the subseted image number [4] has a row less than the number [3].

How can I fix this issue?
In general I would like to have fixed dimension subseted images, with the subset shape being the nearest as possible to the current given shape (through ‘geoRegion’).
Hope everything is clear,
Best regards and many thanks for your time and help!

Hi Davide,

I get your point and see the problem, but I don’t know how we could fix this.
The shift might be arbitrary. Sometimes it goes north and sometimes south. How should we know which pixel region you want? If the pixel-region is constant over all products you could use it directly.

Maybe a solution for you, is to increase the geo-region a bit.

Thanks for the reply @marpet.
I get your point as well, and as a workaround I am now using subset for the first image (set on the geo-region I need) and then I use the collocate Operator for the other images , based on the first subsetted image.
I think I still have the problem that I don’t really know exactly which pixels are taken into account (as the shift might be arbitrary as you said) but at least doing so I have all images of the same size.
Thank you as always!

I am trying to create a subset using shapefile. when I use the land/sea mask tool I got an error. Is there any solution thanks.

You need to resample your data first to a common resolution. Then it works

thanks marpet you mean to say i should resample all my bands to common resolution then i can create subset using shapefile?

yes, you have to apply the S2 Resampling operator before you can create a subset from Sentinel-2 data because the bands have different spatial resolutions.

1 Like

Respected ABraun thankyou.

I have downloaded the sentinel-2 level-2A product but there is a haze in images. How can I remove haze from images. Thanks

This question is off topic for the thread. Please create another thread.
But before use the search function of the forum:
Search results for ‘haze’ - STEP Forum (esa.int)