Skip to content
Permalink
Browse files

[processing] fix handling of "Check for edge contamination" option in

TauDEM algorithms

(cherry-picked from fe24c82)
  • Loading branch information
alexbruy committed Mar 4, 2015
1 parent 0b1a67b commit e94ebd7c7246d91147df5269ade24f3ace6d6439
@@ -109,7 +109,7 @@ def processAlgorithm(self, progress):
commands.append(param.name)
commands.append(param.value)
elif isinstance(param, ParameterBoolean):
if param.value and str(param.value).lower() == 'false':
if not param.value:
commands.append(param.name)
elif isinstance(param, ParameterString):
commands.append(param.name)
@@ -118,7 +118,7 @@ def processAlgorithm(self, progress):
self.STAT_METHOD)]))
commands.append(str(self.DIST_DICT[self.getParameterValue(
self.DIST_METHOD)]))
if str(self.getParameterValue(self.EDGE_CONTAM)).lower() == 'false':
if not self.getParameterValue(self.EDGE_CONTAM):
commands.append('-nc')
commands.append('-dd')
commands.append(self.getOutputValue(self.DIST_DOWN_GRID))
@@ -119,7 +119,7 @@ def processAlgorithm(self, progress):
self.STAT_METHOD)]))
commands.append(str(self.DIST_DICT[self.getParameterValue(
self.DIST_METHOD)]))
if str(self.getParameterValue(self.EDGE_CONTAM)).lower() == 'false':
if not self.getParameterValue(self.EDGE_CONTAM):
commands.append('-nc')
commands.append('-dd')
commands.append(self.getOutputValue(self.DIST_DOWN_GRID))
@@ -115,7 +115,7 @@ def processAlgorithm(self, progress):
self.DIST_METHOD)]))
commands.append('-thresh')
commands.append(str(self.getParameterValue(self.THRESHOLD)))
if str(self.getParameterValue(self.EDGE_CONTAM)).lower() == 'false':
if not self.getParameterValue(self.EDGE_CONTAM):
commands.append('-nc')
commands.append('-du')
commands.append(self.getOutputValue(self.DIST_UP_GRID))
@@ -116,7 +116,7 @@ def processAlgorithm(self, progress):
self.DIST_METHOD)]))
commands.append('-thresh')
commands.append(str(self.getParameterValue(self.THRESHOLD)))
if str(self.getParameterValue(self.EDGE_CONTAM)).lower() == 'false':
if not self.getParameterValue(self.EDGE_CONTAM):
commands.append('-nc')
commands.append('-du')
commands.append(self.getOutputValue(self.DIST_UP_GRID))
@@ -103,7 +103,7 @@ def processAlgorithm(self, progress):
if param is not None:
commands.append('-o')
commands.append(param)
if str(self.getParameterValue(self.EDGE_CONTAM)).lower() == 'false':
if not self.getParameterValue(self.EDGE_CONTAM):
commands.append('-nc')

commands.append('-tla')
@@ -109,7 +109,7 @@ def processAlgorithm(self, progress):
if param is not None:
commands.append('-o')
commands.append(param)
if str(self.getParameterValue(self.EDGE_CONTAM)).lower() == 'false':
if not self.getParameterValue(self.EDGE_CONTAM):
commands.append('-nc')

commands.append('-tla')
@@ -109,7 +109,7 @@ def processAlgorithm(self, progress):
if param is not None:
commands.append('-o')
commands.append(param)
if str(self.getParameterValue(self.EDGE_CONTAM)).lower() == 'false':
if not self.getParameterValue(self.EDGE_CONTAM):
commands.append('-nc')

commands.append('-tla')
@@ -103,7 +103,7 @@ def processAlgorithm(self, progress):
if param is not None:
commands.append('-o')
commands.append(param)
if str(self.getParameterValue(self.EDGE_CONTAM)).lower() == 'false':
if not self.getParameterValue(self.EDGE_CONTAM):
commands.append('-nc')

commands.append('-tla')

0 comments on commit e94ebd7

Please sign in to comment.
You can’t perform that action at this time.