I have the same problem. The error occurs with Terrain-Correction or Speckle-Filter operators are used, but no error when using Calibration or Subset operators.
It would be nice if someone would take a look and explain the reason for this error.
could it be that the â-â sign in the operator somehow raises the error? Can you try another operator with an minus, such as Land-Sea-Mask or Ellipsoid-Correction-GG
I tried also Land-Sea-Mask and Ellipsoid-Correction-GG, but also now LandWaterMask and still the same error. For those I hope there are some default parameters because I didnât bother setting any. Arenât there?
As I suspected.
In line 3 subset is the path to the file.
but in the last line the product is expected.
Instead of target_2 = GPF.createProduct(âTerrain-Correctionâ, parameters, subset)
do target_2 = GPF.createProduct(âTerrain-Correctionâ, parameters, target_1)
Yeah, I guess this one should be working (itâs in progress).
Thanks.
Prior to this part of the code I had calibration done where variables were: calib - which stands for the path and calibration - which stands for the very product
But afterwards I just had single variable subset which I used for both path and product, I didnât pay attention to this.
Regards,
Milos
P.S. Do operators have pre-default parameters or do we need to set before using? If they do have, are they the same as when using SNAP GUI?
Yes, they have default values. And they are the same in the GUI, at the command line and via Python.
In some cases, especially if the operators have a special UI the GUI does parameter handling differently and also the defaults can be different. The reliable default values you see when you call the help for an operator on the command line.
You can retrieve the default value also via API. Simplyfied for the first paramter: GPF.getOperatorSpiRegistry().getOperatorSpi(operatorName).getOperatorDescriptor().getParameterDescriptors()[0].getDefaultValue()