2

I wanted to create a python script using Orfeo Toolbox for Orthorectification of AWiFS Data. I set the environment variables necessary and the following command runs fine from the command prompt:

otbApplicationLauncherCommandLine OrthoRectification -io.in "BAND2_RPC.tif" -map epsg -map.epsg.code 4326 -outputs.mode autosize -outputs.default 0 -elev.default 0 -interpolator bco -interpolator.bco.radius 2 -opt.ram 128 -opt.gridspacing 4 -io.out "BAND2_Ortho.tif"

But the following python script crashes when I try to run it:

import otbApplication
OrthoRectification = 
OtbApplication.Registry.CreateApplication("OrthoRectification")
OrthoRectification.SetParameterString("io.in", "BAND2_RPC.tif")
OrthoRectification.SetParameterString("map","epsg")
OrthoRectification.SetParameterInt("map.epsg.code",4326)
OrthoRectification.SetParameterString("outputs.mode","autosize")
OrthoRectification.SetParameterInt("outputs.default",0)
OrthoRectification.SetParameterInt("elev.default", 0)
OrthoRectification.SetParameterString("interpolator","bco")
OrthoRectification.SetParameterInt("interpolator.bco.radius", 2)
OrthoRectification.SetParameterInt("opt.ram",128)
OrthoRectification.SetParameterInt("opt.gridspacing", 4)
OrthoRectification.SetParameterString("io.out", "BAND2_OrthoRect.tif")
OrthoRectification.ExecuteAndWriteOutput()

I am using OTB-6.4.0-Win64 and Python 2.7.9. The otbApplication module imports fine without any errors. When the ExecuteAndWriteOutput() method is to be executed, the program crashes with the dialogbox "python.exe stopped working".

2

I recommend that you copy/paste the issue on the OTB gitlab issue tracker.

https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/issues

It will notify all otb developers and increase chances that somebody looks at this issue.

Looking at your message, I think that there is indeed an issue on OTB side.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.