Hi, I have tried everything and I don’t seem to find a solution. I am trying to do a mosaic of two Sentinel-2 L2A products, but it always fails during the write phase and SNAP crashes. This happens both in GUI and in gpt (using this graph: Multi-size Mosaic will not work with gpt command line)
I have tried following approaches:
Multi-size Mosaic - input original data, output all bands
Multi-size Mosaic - input original data, only 3 bands and smaller area
Mosaic - input resampled and subsetted (bands) data
And I still get nowhere, strangely I remember this used to work fine for me before.
I work on Virtual Machine with 30GB of RAM, SNAP 7 with latest updates and the disk has enough space. Has anyone faced the same issue or could recomend a solution? Thank you
Can you provide the exception/ error messages from log?
Also, you can uncheck “Save as” for the target product, and just let “Open in SNAP”, to see if the problem is related only with the actual target product saving.
Plus, make sure you have the corresponding write permissions in the location you want to save your target.
In what format are you trying to save the target?
So after a lot of testing, on Linux and Windows it seems there is more issues than one.
The operator does not seem to allocate enough memory even though 25GB (-Xmx) are set and max memory allocated to SNAP in my Linux test. 25 Gb should be more than enugh to mosaic 2 S2 tiles… At the time of the crash only 60% of memory is being used. This error causes the process and entire SNAP to crash.
The second issue seems to be caused by the reprojection done in the mosaicing process. If I select UTM projection for the output data all input bands will be empty, even if the processing does not crash. If I select different projection then the bands will be reprojected and populated with data (only written partially, if it crashes due to memory issue). I think this may be due to the fact that the input data are already in UTM (S2) and the reprojection can not be disabled.
Image: Windows (only 5GB max allocated memory to SNAP) -
A: Multi-size Mosaic - 1 band only, Geographic Lat/Long (WGS84) - process completed successfully
B: Multi-size Mosaic - 1 band only, UTM Zone 56 South - process completed successfully but no data and no projection information
C: Multi-size Mosaic - 4 bands, Geographic Lat/Long (WGS84) - process crashed at approx. 60%
@oana_hogoiu If I disable the Save as everything seems to work fine, but when I try to save the data I end up with empty bands in case of UTM again and crashed SNAP in case of more than 1 band (low RAM) or 4 bands (25Gb)