[SNAP 7.0] Mosaicing L2A: No graphical output

Hello everybody,

my planned workflow is as follows:
Data download -> sen2cor -> Mosaicing -> Spectral/Spatial Subsetting -> Export GeoTIFF

Resampling to 10m must also be a part - but it does not matter if it is done before or after Mosaicing. I followed both tutorial videos (Mosaicing and Multi-Size Mosaic) with the proposed properties, but in the end the output does not show an image. Mosaicing of course quits with the error that there are bands with different resolutions. I even resampled my data before. But after mosaicing, when opening a specific band, there is only shown a black space.

After Multi-size mosaic processing this is produced when I like to show a band:

Has anybody experienced similar difficulties and has a solution on that issue? The only difference to the tutorials is that I am using L2A instead of L1C images.

Many thanks in advance!

How did you resample, your tile?

Did you apply resample? Or s2 resample?

After resample step and before subset, did you visualize your data?

Hi all,

I’ve the exact same problem.

I’m trying to do a mosaic between two Sentinel-2B images in SNAP 7.0.1

S2B_MSIL2A_20190907T112119_N0213_R037_T29TPE_20190907T144322.SAFE
S2B_MSIL2A_20190907T112119_N0213_R037_T29TPF_20190907T144322.SAFE

Using Mosaicing algorithm and choosing bands 2, 3, 4, I get the error

“Product ‘sourceProduct2’ contains bands of different sizes. Currently it is not possible to use it for mosaicking.”

Doing the mosaic with Multi-size Mosaic algorithm, the process runs ok, but the result bands are empty, as shown by @lutabwi

However, this only happens if the mosaic is saved to the disc.

If the ‘Save as’ is not checked and the mosaic is created on demand, the output mosaic is viewable in SNAP:

But, for instance, if I export the rgb view as image, the output is also an empty raster (all bands with value zero, except alpha band):

Anyone confirm? @lutabwi do you also confirm that creating the mosaic on demand, works?

Thank you very much!

Best regards,
Pedro Venâncio

What happens if you process it on demand and then write the correctly displayed product to a file (File > Save Product > BEAM DIMAP)?

I already solved it, but the exact workflow is written on paper in my office. I will attach it to this topic tomorrow. As far as I remember, I resampled both datasets, saved that as BEAM-DIMAP, used the normal Mosaicing Tool, saved that again as BEAM-DIMAP, opened a new program window, loaded the BEAM-DIMAP and exported the data to GeoTIFF. In the Save as export dialog there is another button for creating a subset. I used that and magically my bands were there.

I will confirm you the workflow tomorrow!

1 Like

Now the promised workflow:

I used Level-2A data for mosaicing.

  1. Resampling Tool, resampling is based on a band reference
  2. Saving as BEAM-DIMAP
  3. Loading the BEAM-DIMAP into SNAP, Mosaicing Tool:
    In Map Projection Definition I chose UTM/WGS84 (automatic) from the list; in the box “Mosaic Bounds” make sure to change the corresponding field to your required pixel size. In the Variables & Conditions tab I chose my desired bands. Save the new images as BEAM-DIMAP. Now there are still metadata bands included that need to be excluded if you want to export it as a GeoTIFF.
  4. Loading BEAM-DIMAP into SNAP (I did it in a fresh environment).
  5. Export the Image as GeoTIFF. In the export dialog, there is also a subset button. Use that to at least exclude the metadata bands. There will be a warning you can ignore.
  6. Open the the GeoTIFF an a GIS of your choice (tested in ERDAS & QGIS).

I do not know why it is needed to save it several times, but for me it worked like this. :slight_smile:

Hi @ABraun

It takes several hours to save 3 bands (total of 2.83GB) and the output are also empty rasters:

Thank you very much for the workflow @lutabwi!

Anyway, this seems a SNAP 7.0 bug to me, as the standard workflow to generate mosaics is failing when writing to the disk.