37
37
from processing .core .parameters import ParameterRaster
38
38
from processing .core .parameters import ParameterVector
39
39
from processing .core .parameters import ParameterNumber
40
+ from processing .core .parameters import ParameterBoolean
40
41
from processing .core .parameters import ParameterSelection
41
42
from processing .core .outputs import OutputFile
42
43
@@ -57,8 +58,6 @@ class DropAnalysis(GeoAlgorithm):
57
58
58
59
DROP_ANALYSIS_FILE = 'DROP_ANALYSIS_FILE'
59
60
60
- STEPS = ['Logarithmic' , 'Linear' ]
61
-
62
61
def getIcon (self ):
63
62
return QIcon (os .path .dirname (__file__ ) + '/../../images/taudem.svg' )
64
63
@@ -84,8 +83,8 @@ def defineCharacteristics(self):
84
83
self .tr ('Maximum Threshold' ), 0 , None , 500 ))
85
84
self .addParameter (ParameterNumber (self .TRESHOLD_NUM ,
86
85
self .tr ('Number of Threshold Values' ), 0 , None , 10 ))
87
- self .addParameter (ParameterSelection (self .STEP_TYPE ,
88
- self .tr ('Spacing for Threshold Values ' ), self . STEPS , 0 ))
86
+ self .addParameter (ParameterBoolean (self .STEP_TYPE ,
87
+ self .tr ('Use logarithmic spacing for threshold values ' ), True ))
89
88
self .addOutput (OutputFile (self .DROP_ANALYSIS_FILE ,
90
89
self .tr ('D-Infinity Drop to Stream Grid' )))
91
90
@@ -116,7 +115,7 @@ def processAlgorithm(self, progress):
116
115
commands .append (unicode (self .getParameterValue (self .MIN_TRESHOLD )))
117
116
commands .append (unicode (self .getParameterValue (self .MAX_THRESHOLD )))
118
117
commands .append (unicode (self .getParameterValue (self .TRESHOLD_NUM )))
119
- commands .append (unicode (self .getParameterValue (self .STEPS )))
118
+ commands .append (unicode (self .getParameterValue (self .STEP_TYPE )))
120
119
commands .append ('-drp' )
121
120
commands .append (self .getOutputValue (self .DROP_ANALYSIS_FILE ))
122
121
0 commit comments