Skip to content

Commit

Permalink
OTB helper commands log.
Browse files Browse the repository at this point in the history
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@255 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
cpolymeris@gmail.com committed Jun 19, 2012
1 parent b53e211 commit e0b6ab5
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/sextante/otb/OTBAlgorithm.py
Expand Up @@ -121,26 +121,27 @@ def processAlgorithm(self, progress):
for out in self.outputs:
commands.append(out.name)
commands.append(out.value)

if self.roiFile:
startX, startY = float(self.roiValues[0]), float(self.roiValues[0])
startX, startY = float(self.roiValues[0]), float(self.roiValues[1])
sizeX = float(self.roiValues[2]) - startX
sizeY = float(self.roiValues[3]) - startY
helperCommands = [
path + os.sep + "otbcli_ExtractROI",
"otbcli_ExtractROI",
"-in", self.roiInput,
"-out", self.roiFile,
"-startx", startX,
"-starty", startY,
"-sizex", sizeX,
"-sizey", sizeY]
"-startx", str(startX),
"-starty", str(startY),
"-sizex", str(sizeX),
"-sizey", str(sizeY)]
SextanteLog.addToLog(SextanteLog.LOG_INFO, helperCommands)
OTBUtils.executeOtb(helperCommands, progress)

loglines = []
loglines.append("OTB execution command")
for line in commands:
loglines.append(line)
SextanteLog.addToLog(SextanteLog.LOG_INFO, loglines)

OTBUtils.executeOtb(commands, progress)


0 comments on commit e0b6ab5

Please sign in to comment.