Hi everybody,
I’m trying to perform an Mosaic operation on Snappy, but I found the error below, that don’t specify so much:
Traceback (most recent call last):
File "/scratch/acorroch/opt/img/snappy_test1.py", line 46, in <module>
mosaickImage = mosOp.getTargetProduct()
RuntimeError: org.esa.snap.core.gpf.OperatorException
This is my code:
products = jpy.array('org.esa.snap.core.datamodel.Product', 2)
products[0] = fileOneResampled
products[1] = fileTwoResampled
MosaicOp = esa_snappy.jpy.get_type('org.esa.snap.core.gpf.common.MosaicOp')
mosOp = MosaicOp()
mosOp.setSourceProducts(products)
mosOp.setParameter('westBound','116.99984025621173')
mosOp.setParameter('northBound','32.53731013088188')
mosOp.setParameter('eastBound','118.16895344915102')
mosOp.setParameter('southBound','30.639816504441374')
mosaickImage = mosOp.getTargetProduct()
I checked the gpt Mosaic -h to see the options because I think that maybe I need to specify the bands, but I don’t see how to do it.
Description:
Creates a mosaic out of a set of source products.
Source Options:
-SupdateProduct=<file> A product to be updated.
This is an optional source.
Parameter Options:
-Pcombine=<string> Specifies the way how conditions are combined.
Value must be one of 'OR', 'AND'.
Default value is 'OR'.
-Pcrs=<string> The CRS of the target product, represented as WKT or authority code.
Default value is 'EPSG:4326'.
-PeastBound=<double> The eastern longitude.
Valid interval is [-180,180].
Default value is '30.0'.
-PelevationModelName=<string> The name of the elevation model for the orthorectification.
-PnorthBound=<double> The northern latitude.
Valid interval is [-90,90].
Default value is '75.0'.
-Porthorectify=<boolean> Whether the source product should be orthorectified.
Default value is 'false'.
-PpixelSizeX=<double> Size of a pixel in X-direction in map units.
Default value is '0.05'.
-PpixelSizeY=<double> Size of a pixel in Y-direction in map units.
Default value is '0.05'.
-Presampling=<string> The method used for resampling.
Value must be one of 'Nearest', 'Bilinear', 'Bicubic'.
Default value is 'Nearest'.
-PsouthBound=<double> The southern latitude.
Valid interval is [-90,90].
Default value is '35.0'.
-PwestBound=<double> The western longitude.
Valid interval is [-180,180].
Default value is '-15.0'.
May I need to specify the bands some way or may I do something else?
Thanks,
Álvaro