Skip to content

Commit e0b6ab5

Browse files
author
cpolymeris@gmail.com
committedJun 19, 2012
OTB helper commands log.
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@255 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
1 parent b53e211 commit e0b6ab5

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed
 

‎src/sextante/otb/OTBAlgorithm.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,26 +121,27 @@ def processAlgorithm(self, progress):
121121
for out in self.outputs:
122122
commands.append(out.name)
123123
commands.append(out.value)
124-
124+
125125
if self.roiFile:
126-
startX, startY = float(self.roiValues[0]), float(self.roiValues[0])
126+
startX, startY = float(self.roiValues[0]), float(self.roiValues[1])
127127
sizeX = float(self.roiValues[2]) - startX
128128
sizeY = float(self.roiValues[3]) - startY
129129
helperCommands = [
130-
path + os.sep + "otbcli_ExtractROI",
130+
"otbcli_ExtractROI",
131131
"-in", self.roiInput,
132132
"-out", self.roiFile,
133-
"-startx", startX,
134-
"-starty", startY,
135-
"-sizex", sizeX,
136-
"-sizey", sizeY]
133+
"-startx", str(startX),
134+
"-starty", str(startY),
135+
"-sizex", str(sizeX),
136+
"-sizey", str(sizeY)]
137+
SextanteLog.addToLog(SextanteLog.LOG_INFO, helperCommands)
137138
OTBUtils.executeOtb(helperCommands, progress)
138139

139140
loglines = []
140141
loglines.append("OTB execution command")
141142
for line in commands:
142143
loglines.append(line)
143-
SextanteLog.addToLog(SextanteLog.LOG_INFO, loglines)
144+
144145
OTBUtils.executeOtb(commands, progress)
145146

146147

0 commit comments

Comments
 (0)
Please sign in to comment.