fix_error_OTBLineSegmentDetectionAlg.patch
sextante/otb/OTBAlgorithm.py 2012-04-15 23:36:28.000000000 +0200 | ||
---|---|---|
6 | 6 |
from sextante.parameters.ParameterTable import ParameterTable |
7 | 7 |
from sextante.parameters.ParameterMultipleInput import ParameterMultipleInput |
8 | 8 |
from sextante.parameters.ParameterRaster import ParameterRaster |
9 |
from sextante.parameters.ParameterSelection import ParameterSelection |
|
9 | 10 |
from sextante.outputs.OutputRaster import OutputRaster |
10 | 11 |
from sextante.parameters.ParameterVector import ParameterVector |
11 | 12 |
from sextante.parameters.ParameterBoolean import ParameterBoolean |
... | ... | |
61 | 62 |
libpath = OTBUtils.otbLibPath() |
62 | 63 |
if path == "" or libpath == "": |
63 | 64 |
raise GeoAlgorithmExecutionException("OTB folder is not configured.\nPlease configure it before running OTB algorithms.") |
64 |
|
|
65 |
|
|
65 |
|
|
66 |
|
|
66 | 67 |
commands = [] |
67 | 68 |
if SextanteUtils.isWindows(): |
68 | 69 |
commands.append(path + os.sep + self.cliName) |
... | ... | |
78 | 79 |
elif isinstance(param, ParameterMultipleInput): |
79 | 80 |
commands.append(param.name) |
80 | 81 |
commands.append(str(param.value.replace(";"," "))) |
82 |
elif isinstance(param, ParameterSelection): |
|
83 |
idx = int(param.value) |
|
84 |
commands.append(param.name) |
|
85 |
commands.append(str(param.options[idx])) |
|
81 | 86 |
elif isinstance(param, ParameterBoolean): |
82 | 87 |
if param.value: |
83 | 88 |
commands.append(param.name) |