Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[processing] fix handling of "Check for edge contamination" option in
TauDEM algorithms

(cherry-picked from fe24c82)
  • Loading branch information
alexbruy committed Mar 10, 2015
1 parent 0b1a67b commit e94ebd7
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/taudem/TauDEMAlgorithm.py
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/taudem/dinfdistdown.py
Expand Up @@ -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))
Expand Down
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/taudem/dinfdistup.py
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/taudem/dinfdistup_multi.py
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/taudem/dinftranslimaccum.py
Expand Up @@ -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')
Expand Down
Expand Up @@ -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')
Expand Down
Expand Up @@ -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')
Expand Down
Expand Up @@ -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')
Expand Down

0 comments on commit e94ebd7

Please sign in to comment.