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.
Many thanks in advance,
why I cannot use the S2resampling tool in a graph to make a butch processing?
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…
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!
if I try to firstly export just the bands that I need before resampling, this is the error message I get:
I do not really understand where the problem is…
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.
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?
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?
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…
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!
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.
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…
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.
The title of this threat is just what I needed so I think I would like to continue it.
My ROI falls between 2 Sentinel-2 2A-level images for which I would like to have a single image with all 10m and 20m bands resampled at 10m and then extract spectral values for polygons. I am not sure which is the most efficient way of doing it and which tools to use for resampling since I have seen many alternatives in other threats at this forum.
1 - Load the 2 images
2 - Resample and subset to ROI with Optical>Sentinel-2 super-resolution.
The subset is done by indicating the coordinates of the ROI’s bounding box in the “Geo Coordinates” tab, and selecting the target bands (10 and 20m bands) in the tabs “Geo Coordinates” and “Advance Parameters”. In the “I/O Parameters” section I am not sure if it is convenient to save the product, and if I should, I am not sure which extension to use.
My first question arises here: which tool should I use for this? I have seen people using Raster>Geometric>Resampling and Optical>Geometric>S2 Resampling Processor too. From what I read, “Sentinel-2 super-resolution” is better since it is a pansharpening.
3 - Mosaic both resampled subsets with Raster>Geometric>Mosaicking.
I have seen people also use “Multi-size Mosaic”.
4 - Export the resulting mosaic.
This part is confusing for me because I dont know which format to choose. Ideally I want to load the image in R/Rstudio to be able to read it as a stack (with terra or raster packages). For this I have another topic open (SNAP to R/Rstudio I have found that using the format “GDAL-GTiff-WRITER” works OK. Is there another formats that keep the information better?
Thanks in advance.