Skip to content

Commit

Permalink
[processing] update TauDEM tools to latest TauDEM version
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Aug 23, 2016
1 parent 19a6a5f commit 640f93e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Expand Up @@ -9,3 +9,4 @@ ParameterVector|-o|Outlets shapefile|0|True
ParameterNumber|-csol|Concentration Threshold|1.0|100.0|1.0
ParameterBoolean|-nc|Check for edge contamination|True
OutputRaster|-ctpt|Concentration Grid
OutputRaster|-q|Overland Flow Specific Discharge Grid
Expand Up @@ -2,4 +2,6 @@ Pit Remove
pitremove
Basic Grid Analysis tools
ParameterRaster|-z|Elevation Grid|False
ParameterRaster|-depmask|Depresion mask grid|True
ParameterBoolean|-4way|Fill considering only 4 way neighbours|False
OutputRaster|-fel|Pit Removed Elevation Grid
9 changes: 4 additions & 5 deletions python/plugins/processing/algs/taudem/dropanalysis.py
Expand Up @@ -37,6 +37,7 @@
from processing.core.parameters import ParameterRaster
from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterNumber
from processing.core.parameters import ParameterBoolean
from processing.core.parameters import ParameterSelection
from processing.core.outputs import OutputFile

Expand All @@ -57,8 +58,6 @@ class DropAnalysis(GeoAlgorithm):

DROP_ANALYSIS_FILE = 'DROP_ANALYSIS_FILE'

STEPS = ['Logarithmic', 'Linear']

def getIcon(self):
return QIcon(os.path.dirname(__file__) + '/../../images/taudem.svg')

Expand All @@ -84,8 +83,8 @@ def defineCharacteristics(self):
self.tr('Maximum Threshold'), 0, None, 500))
self.addParameter(ParameterNumber(self.TRESHOLD_NUM,
self.tr('Number of Threshold Values'), 0, None, 10))
self.addParameter(ParameterSelection(self.STEP_TYPE,
self.tr('Spacing for Threshold Values'), self.STEPS, 0))
self.addParameter(ParameterBoolean(self.STEP_TYPE,
self.tr('Use logarithmic spacing for threshold values'), True))
self.addOutput(OutputFile(self.DROP_ANALYSIS_FILE,
self.tr('D-Infinity Drop to Stream Grid')))

Expand Down Expand Up @@ -116,7 +115,7 @@ def processAlgorithm(self, progress):
commands.append(unicode(self.getParameterValue(self.MIN_TRESHOLD)))
commands.append(unicode(self.getParameterValue(self.MAX_THRESHOLD)))
commands.append(unicode(self.getParameterValue(self.TRESHOLD_NUM)))
commands.append(unicode(self.getParameterValue(self.STEPS)))
commands.append(unicode(self.getParameterValue(self.STEP_TYPE)))
commands.append('-drp')
commands.append(self.getOutputValue(self.DROP_ANALYSIS_FILE))

Expand Down

0 comments on commit 640f93e

Please sign in to comment.