Resample processing time


#1

Hello,

I need to resample 50 or 60 Sentinel 2 images. It takes almost 4 hours for one image. Is it normal?? Or it is just my computer??

Any other way to do it faster??

Thanks in advance,


#2

Hi,

at what resolution are you resampling the images? Have you tried to subset the images before writting them? If you are not going to use some bands, if you remove them using the subset operator, it should be faster (for example, there are two angle bands for every spectral band and perhaps you are not going to use them)


Why doesn't the image show up
Problem with KMZ file exporting
#3

It is also worth to mention that there is a kind of preliminary (or virtual) resampling for S2 which is offered before many operations:

If you directly select “Yes” you are led to the Resampling operator but the output product path is greyed out:

don’t select “save as…” and leave it like that.
Make your choices in the second tab and hit “Run”

The product is created within 1 second because it is not physically stored as a raster on your hard drive but only as a logical condition defined by your resampling.

You can then work with the virtual product, for example to make a spatial subset (or any other operation). The resampling process is started then only for the selected bands and pixels.

Should take much less time.


Cloud mask - SNAP sentinel 2
Masking of Sentinel 2 data
Exporting Sentinel 2 Imagery
Sentinel-2 Super-Resolution (all bands at 10m): Snap plugin now available!
Classification of Sentinel1 product
#4

Thank you very much, that will save us a lot of time.


#5

One related question: I have several intermediate steps before the final product. Can I work with virtual products and only save as BEAM-DIMAP the last product?? Virtual products are much faster to create and It would be a great solution since I have to work with 50-60 images.

These are the steps:

  1. resample to 10m
  2. subsets of bands 2, 3, 4, 8 and 11
  3. reprojection to ETRS 89, 31N
  4. land/sea mask (with an imported shp vector)
  5. kmeans cluster analysis
  6. export to GepTiff

Any help will be much appreciated.


#6

probably if you create a graph file with this processing chain. It computes the intermediate products in the memory and only writes the final product to a physical file.
You can then apply this graph on various images.


#7

The “virtual” products are only faster because no data has been computed when they are created. The computation takes place only when the data is requested (image is displayed). 4 hours seems to be a long time. I agree. How much memory does your PC have?

Creating a graph, as @ABraun said, and let it run from the command line is the best way of computing such a bunch of data.


#8

Thank you very much @ABraun and @marpet, the graph worked perfectly and only took 40 minutes (1 image).


#9

How easy and quick
I wish I had that How-to one year ago or more !!
Anyway I still don’t understand why GrassGis does this : resample , band math ,and image displayed in a few minutes -versus 1hour with Snap for the same size image

So many thanks
bruno


#10

you can not set the resolution.it is ok.