Sentinel-2: Resampling Spatial Resolution

thank you for clarification, no need to apologize :+1:

Yes, this is a valid operation in remote sensing. There are many applications where your data has to be stored at a defined spatial resolution, for example 20 m. The process which translates 10 and 60 m bands into 20 m is called resampling and it is one of the basic operations for image preparation.
You have to be aware that the information content of the images can change during this process and usually there are some parameters to define how the new pixel value is calculated under the new geometry (nearest neigbor, bilinear, bi-cubic…), but in GEE this is not very transparent and mostly done without asking the user. Still, you can use the output.

If you simply need images (or parts) in RGB at a certain resolution, you can also check the EO Browser: https://apps.sentinel-hub.com/eo-browser/

I have distributed my question in some forums, and I got what I need in this forum.

Now, I can sleep very well. :grinning:

I really appreciate Braum, Thank you very much. :+1:

Hi there,

I have a question that fits well in this topic.
I have been searching explanations about the methodology used for the spatial downsampling of the bands. Unfortunately, I couldn’t find specifications.

Let’s say that I have an L1C image that I want to resample to 20m resolution. For me is quite intuitive (but I’m still not sure) that bands with 10m (B2, B3, B4) will be upscaled by averaging the value of 2 pixels in order to obtain 20m. But how are the 60m downsampled? the pixel is just splitted in 3 pixels of 20m? these 3 pixels will have the same value?

I am not sure if my question was clear.

Thank you,

Giulia

Depends on upsampling method, for example bilinear.

Thank you for your reply. Do you know where I can find specifications about the resampling method? what does the bilinear do exactly?

Thank you

please have a look here


I can recommend reading about different methods online and in books, for example:

2 Likes

Hello guys. Seems I am faced with a similar challenge here. I want to extract some point values from my Sentinel-2 data. However, the points are sample plots of 20 m * 40 m in dimension. I want to downscale my sentinel-2 resolution from 10 m * 10 m to 20 m * 40 m. I will appreciate any suggestion on what to do, whether there are procedures I should take note of. Thank you in advance for your responses.

wouldn’t it be easier to import the sample plots as a vector and then extract mean values per polygon?

Resampling to 20x40 m will not grant that the pixel boundaries fall together with your plots.

Thank you @ABraun for your response. I did exactly what you just mentioned, but I am advised to resample my sentinel-2 to see whether it improves my model because I am regressing forest biomass with Sentinel-2 bands and variables in my model. I am working with 65 field transect plots (points) with 20 m * 40 m dimension each while my Sentinel-2 resolution is 10 * 10. Does it not matter to resample the sentinel. What do you suggest I do? I would be glad to receive your suggestion.
image

I see, thank you for the explanation.
If you use nearest neighbor resampling, the result will not change at all, because the pixel values stay the same. If you use bilinear resampling (or another) the pixel values are altered. But I see little in doing so, to be honest, only if you extract the values by points.

However, the S2 Resampling operator (under Optical > Geometric) only allows 10, 20 or 60 and the Resampling Operator (under Raster > Geometric) only allows square pixels. You can, technically, set 40 m and Bilinear so each pixel contains information of an area within 40x40m

Thank you @ABraun for your elaborated explanation. Yes, I will be extracting the values by points.

You say your are having points. But why do the points have an extent?
How have they be generated?
Maybe you can generated polygons - or rectangles - instead of points.
Then you can extract those pixels either by “Raster / Export / Mask Pixels” or you can use the StatisticsOp. There is a thread explaining its usage.
A StatisticsOp graph - GPF Graphs - STEP Forum (esa.int)
If you still want to resample the S2 data you can use the Multi-size Mosaic operator at “Raster / Geometric / Multi-size Mosaic”.

1 Like

Thank you, @marpet, for your suggestion. Actually, each point represents an individual sample plot whose tree aboveground biomass was calculated from field measurements, and the dimension of each plot on the field is 20 m * 40 m.
Also, is there a way I can do this on R programming if I want to do it? Thank you for your anticipated response.

So, even if you resample the data, the 2x4 pixel will in most cases not match your 20x40 area.

This is probably also doable in R or in Python if you like.
But it is more likely to find help in the respective forums.

Okay. Thank you again @marpet. A senior colleague of mine just suggested that the information in the raster can be extracted as a pixel-weighted average around the sample point: If my field plot is 800 m2 (i.e 20 * 40), I will need to extract information from 8 pixels (averaged) around the point. In case you are aware of this approach, what do you think of it?

You could use the pixel extraction.
but this allows only the extraction of squared areas so 3x3 would be the closest.
Raster / Export / Extract Pixel Values

You could do a filter operation (Raster / Filtered Band) with a user defined filter:
image

And there is still the problem that your field measurements are not aligned with the scene image. The probably do not lie like the orange rectangle, probably more like the pink ones.

So it would be good to have the shape of the rectangles. Then the StatisticsOp as mentioned before can be used or the imported shapes are used as mask and then you can export the mask values.
image
Due to the bug SNAP-1352, you have to save the product and reopen it after you have created the masks. Otherwise the option will not be enabled.

1 Like

Thank you @marpet for the detailed illustration. Let me try it out.

Hi there,

I am new to SNAP and I have a question about resampling too. I have opened a Sentinel-2 L2A .xml file in SNAP and wish to resample all bands to 10m spatial resolution. I used the tool from Raster > Geometric Operations > Resampling

I defined the size of the resampled product from source product “B4”, which I think should result in all bands having 10m spatial resolution.

When I check the metadata for the resampled product it says the spatial resolution of B1 is 60m

I checked the metadata here: Metadata/Level_2A_User_Product/General_Info/Spectral_Information_List/Spectral_Information

Does this mean the resampling didn’t work, or am I looking in the wrong place?

Also, (not sure if it matters) I had subset the image before resampling.

The metadata is changed changed by the resampling.
You can check the size of the images by selecting it in the product tree and open the Information Window image
There the size is shown. If all bands have the same, then the resampling worked.

Depending on how you want to use the resulting resampled data it might be better do use the dedicated S2 resampling tool (Optical / Geometric / S2 Resampling Processor).
Have a look in the help there the reason is explained or check this thread.
Tile border bug? - s2tbx - STEP Forum (esa.int)
in a nutshell, if you want to use the view angles in subsequent steps you better use the special resampler.

1 Like