Hi OTB team !
I’m trying to use the actual develop branch but I’m facing a strange behavior with the Superimpose application.
Here is my code snippet
import otbApplication as otb
srtm_dir = "./SRTM"
geoid_file = "./egm96.grd"
ref_raster = "SENTINEL2B_20200101-000000-000_L2A_T31TCJ_D_V1-7_FRE_STACK.tif"
vv_raster = "s1a-iw-grd-vv-20170519t174702-20170519t174727-016654-01ba3e-001.tiff"
vh_raster = "s1a-iw-grd-vh-20170519t174702-20170519t174727-016654-01ba3e-002.tiff"
cal_vv = otb.Registry.CreateApplication("SARCalibration")
cal_vv.SetParameterString("in", vv_raster)
cal_vv.SetParameterString("lut", "gamma")
cal_vv.Execute()
cal_vh = otb.Registry.CreateApplication("SARCalibration")
cal_vh.SetParameterString("in", vh_raster)
cal_vh.SetParameterString("lut", "gamma")
cal_vh.Execute()
superimp_vv = otb.Registry.CreateApplication("Superimpose")
superimp_vv.SetParameterInputImage("inm",
cal_vv.GetParameterOutputImage("out"))
superimp_vv.SetParameterString("inr", ref_raster)
superimp_vv.SetParameterString("elev.dem", srtm_dir)
superimp_vv.SetParameterString("elev.geoid", geoid_file)
superimp_vh = otb.Registry.CreateApplication("Superimpose")
superimp_vh.SetParameterInputImage("inm",
cal_vv.GetParameterOutputImage("out"))
superimp_vh.SetParameterString("inr", ref_raster)
superimp_vh.SetParameterString("elev.dem", srtm_dir)
superimp_vh.SetParameterString("elev.geoid", geoid_file)
superimp_vv.Execute()
superimp_vh.Execute()
this code return the following error
ERROR 10: Pointer 'hDS' is NULL in 'GDALGetProjectionRef'.
ERROR 10: Pointer 'hSrcDS' is NULL in 'GDALCreateWarpedVRT'.
Erreur de segmentation (core dumped)
However if I remove one of these Execute()
superimp_vv.Execute()
superimp_vh.Execute()
It works.
Furthermore, without removing one of the two Execute()
if I delete the two lines containing
.SetParameterString("elev.geoid", geoid_file)
It works again. Is something wrong with the elev.geoid
parameter ?
I’m using the last otb develop branch to build my own conda package, maybe the issue comes from my build. EDIT : It has been reproduced with OTB 8.0 binaries.
Are you able to reproduce this issue ? All the data needed to reproduce the issue are into the archive (11Mo)
Thanks,
Arthur.