Python Mosaicing S1 SAR products problem(s)

only BEAM-DIMAP Format

Maybe your input products use a compression? 1.7 GB for a mosaic does not seem to big to me.
But the difference between SNAP Desktop and snappy is strange. I think somehow the configuration must be different.
As far as I can see the operator uses the data type of the source bands for the target bands. This should not make the difference.
Why the GeoTIFF-BigTIFF hangs after a while might be caused by your memory settings.
Please have a look at the following thread.

You can use NetCDF4-CF as output format. This uses compression by default and does not have the 4294967292 limit.
For GeoTIFF-BigTIFF you can configure the compression:

You can add those properties to the etc/ file in the installation directory.

Hi Marpet,

regarding the memory settings, since the beginning my snappy.ini is configured such
java_max_mem = 8G
I am not facing any memory issues up to now, and i have tested that with several sar features.

Besides that, i do not have any error report and monitoring my memory i do not see swaping or so.

My input products are directly ESA’s safe folders. I have no idea if they have any kind of compression…
A potential workaround would then be to save the mosaic in beam-dimap format and then call with a system command the pconvert to save as GeoTIFF?

If it works, it sounds like a feasible workaround.
But actually it should be possible to write directly to Big-GeoTiff.
But I have no clue what goes wrong here.

Did you find a solution? I am facing the same problem. I am using a GeoTIFF-BigTIFF as an output, using snappy and the file that is created has 0 bytes and the script hangs for ever. I changed the compression at the etc/


but still not working. Any tips?

Are you using the command line or do you use the GUI?
What are your memory settings?

I wrote a .py script importing snappy.

java_max_mem: 11G

Do you need more info?

And have you changed the tile cache size?

I left it as it was:
snap.jai.tileCacheSize = 1024

Should I change it?

Yes, try with 7000 or 8000 if you have 11G of memory available.

I changed it, but I still have the same problem. The weird thing is that I am testing two different Polygons for the creation of the subset.
When I use the small area, the script is running even if I use:
OutputType = [".tif", “GeoTIFF-BigTIFF”]
ProductIO.writeProduct(pca, newFile, OutputType[1])

So GeoTIFF-BigTIFF is working properly as a parameter for my output product.

When I use the larger area, the script hangs and the product has 0 bytes.
I can’t understand why this is happening. Could it be a memory setting?

Any tips??

How big is the difference of your polygons in terms of pixels?
Do you really need GeoTiff format?
You could try with another format.
Are you only using subset or do you have other processing steps before?