Correct, the function
def apply_orbit_file(product):
parameters = HashMap()
parameters.put("Orbit State Vectors", "Sentinel Precise (Auto Download)")
parameters.put("Polynomial Degree", 3)
parameters.put("continueOnFail",True)
return GPF.createProduct("Apply-Orbit-File",parameters,product
works well, the problem is with
def terrain_correction(product,prj) :
parameters = HashMap()
parameters.put('sourceBandNames', 'Amplitude_VV')
parameters.put('demResamplingMethod', 'CUBIC_CONVOLUTION')
parameters.put('imgResamplingMethod', 'CUBIC_CONVOLUTION')
parameters.put('demName', 'SRTM 3Sec')
parameters.put('pixelSpacingInMeter', 10.0)
parameters.put('externalDEMApplyEGM', True)
parameters.put('saveSelectedSourceBand', True)
parameters.put('mapProjection', prj)
parameters.put('nodataValueAtSea',False)
parameters.put('maskOutAreaWithoutElevation',False)
return GPF.createProduct("Terrain-Correction",parameters,product)
that return:
Product name: S1A_IW_GRDH_1SDV_20210717T004347_20210717T004412_038810_049451_96C0
Zip folder already there
INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: Installed GDAL 3.0.4 set to be used by SNAP.
INFO: org.hsqldb.persist.Logger: dataFileCache open start
WARNING: org.esa.s1tbx.sar.gpf.orbits.ApplyOrbitFileOp: No valid orbit file found for 17-JUL-2021 00:42:43.000000
Orbit files may be downloaded from https://scihub.copernicus.eu/gnss/odata/v1/
and placed in C:\Users\enemni\.snap\auxdata\Orbits\Sentinel-1\POEORB\S1A\2021\07
WARNING: org.esa.s1tbx.sar.gpf.orbits.ApplyOrbitFileOp: Using Sentinel Restituted C:\Users\enemni\.snap\auxdata\Orbits\Sentinel-1\RESORB\S1A\2021\07\S1A_OPER_AUX_RESORB_OPOD_20210717T042731_V20210717T000238_20210717T032008.EOF instead
100% done.
Traceback (most recent call last):
File "-", line 600, in <module>
obj.run()
File "-, line 538, in run
snap_orb_TC(zip_path,self.prj)
File "-", line 122, in snap_orb_TC
VV = terrain_correction(sar_product,prj)
File "-", line 103, in terrain_correction
return GPF.createProduct("Terrain-Correction",parameters,product)
RuntimeError: java.lang.ArithmeticException: / by zero
INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: GDAL 3.0.4 found on system. JNI driver will be used.
INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: Installed GDAL 3.0.4 set to be used by SNAP.
INFO: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterIO: Initializing external tool adapters
INFO: org.esa.snap.core.util.EngineVersionCheckActivator: Please check regularly for new updates for the best SNAP experience.
this seems similar to https://forum.step.esa.int/t/orbit-file-timeout-march-2021/28621/153