Resampling, mosaicing and subsetting workflow for Sentinel-2


#1

Dear all,

I am trying to create a workflow which simplifies the mosaic of 2 Sentinel-2 tiles. Since I am working on a multitemporal analysis, I would need to make it as fast as possible.
What I am looking for is a way to resample the tiles at 10 m, make a mosaic and create a smaller subset.
I realised that the S2resampling tool does not work in a graph, and the mosaic as well is not an option selectable.
Every time I try to create a workflow, a new obstacle comes up.

At the end of the day, I decided to go on through the Multisize Mosaic tool, in which I can select the bands I need, select the coordinates of the crop and also decide the final resolution.
But… I have a doubt: what is the resampling method? Since I also need to bands 5, 11 and 12 (20 m res), how the software resample them at 10 m?

Hope this is crystal clear.

If not, please ask. :slight_smile:
Many thanks in advance,

Michele


#2

Also,

why I cannot use the S2resampling tool in a graph to make a butch processing?


#3

Hi Michele,

it should work. Have you updated your SNAP installation? Are you using an original S2 image or you have processed it before trying to apply the S2Resampling operator?

On the other hand, I do not know if you need all the bands in your output product, but I suggest you to apply a subset operator after the resampling and before writing the product because there are 30 bands of viewing and solar angles that probably you are not going to use and they take a lot of space. In the original product, these bands exist but at 5000 m resolution, so they are very small, but if you resample them to 10,20 or 60 meters…


#4

Hi Obarrilero,

yes, the software is updated and I am working with original S-2 products (no processing steps have been done before importing in SNAP)

Exactly, I do not need all the bands.

Just to recap, I need to resample 2 tiles, mosaic them and make a subset to reduce the size of the final product.

As you saw, if I try to resample them through a graph to make the thing faster, it doesn`t work.

The fastest way I experienced so far is working on each single tile, resampling them.
Then, I use the mosaic tool selecting the coordinates of the subset and the bands I need.
But this lengthens the process. I would like to create a graph. As you say, resizing all those bands is a long procedure…
What do you suggest?

Many thanks for your help!


#5

Also:

if I try to firstly export just the bands that I need before resampling, this is the error message I get:

image

I do not really understand where the problem is…


#6

I have just done some tests and finally I have been able to reproduce your problem with the graph builder and S2Resampling.
I think that perhaps it is caused because when opening a S2 product, SNAP is not loading some masks that are needed. Please, could you check in “Menu -> Tools -> Options -> S2TBX -> Sentinel-2 Reader Masks” that you are loading at least the detector footprint masks when opening a product? These masks are required by this processor.


#7

Thanks, I just controlled and I suppose this is not the problem because each box is selected in the menu:

So, you are also facing with the same problem now?


#8

I only have the problem when unchecking the “Load detector footprint masks”.
From where have you downloaded your products? From scihub (https://scihub.copernicus.eu/dhus/#/home) ?
When you open it in SNAP, can you see the detector footprint masks?


#9

The answer is yes to both the questions:

I downloaded the products from the same link and I can see all the detector footprint masks…


#10

The weird thing is that I can use the S-2resampling tool from Menu > Optical > Geometric but I cannot via a graph…
And this happens trying with the same S2 product.
Any idea? I am working on a big dataset and I need to shorten the procedure.

Many thanks in advance!


#11

Hi Michele,
I just tried with one S2B_L1C to do the resampling using the Graph Builder. I checked all the three labels clicking on them (Read, Write and S2Resampling) and after that the error message disappeared. Actually, the process is running. Maybe it is just a bug. Click on the labels and check if the message it is still there afterwards.


#12

Hi abruescas,

unfortunately not, even if I click on the labels the process doesn`t run.
Do you think there is same pre-installed setting in the software that must be changed?
The weird thing is that it seems that the thing is not working just on my computer…


#13

Maybe the hard way works: uninstall and reinstall SNAP and update all modules
Just the other day a collueague had also a strange problem with SNAP. After reinstallation it worked nicely again.