Skip to content

Commit fe24c82

Browse files
committedMar 4, 2015
[processing] fix handling of "Check for edge contamination" option in
TauDEM algorithms
1 parent d6f0dbd commit fe24c82

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed
 

‎python/plugins/processing/algs/taudem/TauDEMAlgorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def processAlgorithm(self, progress):
109109
commands.append(param.name)
110110
commands.append(param.value)
111111
elif isinstance(param, ParameterBoolean):
112-
if param.value and str(param.value).lower() == 'false':
112+
if not param.value:
113113
commands.append(param.name)
114114
elif isinstance(param, ParameterString):
115115
commands.append(param.name)

‎python/plugins/processing/algs/taudem/dinfdistdown.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def processAlgorithm(self, progress):
118118
self.STAT_METHOD)]))
119119
commands.append(str(self.DIST_DICT[self.getParameterValue(
120120
self.DIST_METHOD)]))
121-
if str(self.getParameterValue(self.EDGE_CONTAM)).lower() == 'false':
121+
if not self.getParameterValue(self.EDGE_CONTAM):
122122
commands.append('-nc')
123123
commands.append('-dd')
124124
commands.append(self.getOutputValue(self.DIST_DOWN_GRID))

‎python/plugins/processing/algs/taudem/dinfdistdown_multi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def processAlgorithm(self, progress):
119119
self.STAT_METHOD)]))
120120
commands.append(str(self.DIST_DICT[self.getParameterValue(
121121
self.DIST_METHOD)]))
122-
if str(self.getParameterValue(self.EDGE_CONTAM)).lower() == 'false':
122+
if not self.getParameterValue(self.EDGE_CONTAM):
123123
commands.append('-nc')
124124
commands.append('-dd')
125125
commands.append(self.getOutputValue(self.DIST_DOWN_GRID))

‎python/plugins/processing/algs/taudem/dinfdistup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def processAlgorithm(self, progress):
115115
self.DIST_METHOD)]))
116116
commands.append('-thresh')
117117
commands.append(str(self.getParameterValue(self.THRESHOLD)))
118-
if str(self.getParameterValue(self.EDGE_CONTAM)).lower() == 'false':
118+
if not self.getParameterValue(self.EDGE_CONTAM):
119119
commands.append('-nc')
120120
commands.append('-du')
121121
commands.append(self.getOutputValue(self.DIST_UP_GRID))

‎python/plugins/processing/algs/taudem/dinfdistup_multi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def processAlgorithm(self, progress):
116116
self.DIST_METHOD)]))
117117
commands.append('-thresh')
118118
commands.append(str(self.getParameterValue(self.THRESHOLD)))
119-
if str(self.getParameterValue(self.EDGE_CONTAM)).lower() == 'false':
119+
if not self.getParameterValue(self.EDGE_CONTAM):
120120
commands.append('-nc')
121121
commands.append('-du')
122122
commands.append(self.getOutputValue(self.DIST_UP_GRID))

‎python/plugins/processing/algs/taudem/dinftranslimaccum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def processAlgorithm(self, progress):
103103
if param is not None:
104104
commands.append('-o')
105105
commands.append(param)
106-
if str(self.getParameterValue(self.EDGE_CONTAM)).lower() == 'false':
106+
if not self.getParameterValue(self.EDGE_CONTAM):
107107
commands.append('-nc')
108108

109109
commands.append('-tla')

‎python/plugins/processing/algs/taudem/dinftranslimaccum2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def processAlgorithm(self, progress):
109109
if param is not None:
110110
commands.append('-o')
111111
commands.append(param)
112-
if str(self.getParameterValue(self.EDGE_CONTAM)).lower() == 'false':
112+
if not self.getParameterValue(self.EDGE_CONTAM):
113113
commands.append('-nc')
114114

115115
commands.append('-tla')

‎python/plugins/processing/algs/taudem/dinftranslimaccum2_multi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def processAlgorithm(self, progress):
109109
if param is not None:
110110
commands.append('-o')
111111
commands.append(param)
112-
if str(self.getParameterValue(self.EDGE_CONTAM)).lower() == 'false':
112+
if not self.getParameterValue(self.EDGE_CONTAM):
113113
commands.append('-nc')
114114

115115
commands.append('-tla')

‎python/plugins/processing/algs/taudem/dinftranslimaccum_multi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def processAlgorithm(self, progress):
103103
if param is not None:
104104
commands.append('-o')
105105
commands.append(param)
106-
if str(self.getParameterValue(self.EDGE_CONTAM)).lower() == 'false':
106+
if not self.getParameterValue(self.EDGE_CONTAM):
107107
commands.append('-nc')
108108

109109
commands.append('-tla')

0 commit comments

Comments
 (0)
Please sign in to comment.