Hi all,
After the sen2cor transformation I need to create a GeoTiff from a L2A image, resampling all the bands at 10m.
I wrote this python code:
from snappy import ProductIO
from snappy import jpy
from snappy import GPF
p = ProductIO.readProduct('S2A_USER_...T101020.xml') #path of the xml file
GPF.getDefaultInstance().getOperatorSpiRegistry().loadOperatorSpis()
HashMap = jpy.get_type('java.util.HashMap')
parameters = HashMap()
parameters.put('targetResolution', 10)
product=GPF.createProduct('Resample', parameters, p)
ProductIO.writeProduct(product, 'prova12.tif', "GeoTIFF-BigTIFF") #this is line 41
I get this error, while the process is working
SEVERE: org.esa.snap.core.gpf.internal.OperatorSpiRegistryImpl: org.esa.s1tbx.in
sar.gpf.OffsetTrackingOp$Spi:Offset-Tracking conflicts with org.esa.s1tbx.insar.
gpf.coregistration.OffsetTrackingOp$Spi:Offset-Tracking
And, after some minutes, the process end with this error:
Traceback (most recent call last):
File "py_test.py", line 41, in <module>
RuntimeError: java.lang.RuntimeException: Cannot construct DataBuffer.
Could please someone help me about this?
I have set Java system Xmx parameter to 20GB, so I don’t think is a memory leak.
If this is not the problem, maybe it is the tile cache size.
Please change the value of snap.jai.tileCacheSize in snap.properties.
It is located in the etc folder of your SNAP installation directory. You can set it to 5000 for example.