16
16
* *
17
17
***************************************************************************
18
18
"""
19
- from processing .core .parameters import ParameterMultipleInput
20
- from processing .algs .saga .SagaAlgorithm import SagaAlgorithm
21
- from processing .core .GeoAlgorithm import GeoAlgorithm
22
- from processing .core .parameters import ParameterString
23
- from processing .algs .saga .SagaGroupNameDecorator import SagaGroupNameDecorator
19
+
24
20
25
21
__author__ = 'Victor Olaya'
26
22
__date__ = 'May 2014'
34
30
from processing .core .parameters import ParameterRaster
35
31
from processing .core .outputs import OutputRaster
36
32
from processing .tools .system import *
33
+ from processing .core .parameters import ParameterMultipleInput
34
+ from processing .algs .saga .SagaAlgorithm import SagaAlgorithm
35
+ from processing .core .GeoAlgorithm import GeoAlgorithm
36
+ from processing .core .parameters import ParameterString
37
+ from processing .algs .saga .SagaGroupNameDecorator import SagaGroupNameDecorator
37
38
38
39
39
40
class RasterCalculator (SagaAlgorithm ):
@@ -59,21 +60,9 @@ def defineCharacteristics(self):
59
60
self .cmdname = 'Grid Calculator'
60
61
self .undecoratedGroup = "grid_calculus"
61
62
self .group = SagaGroupNameDecorator .getDecoratedName (self .undecoratedGroup )
62
- self .addParameter (ParameterRaster (self .GRIDS , 'Main input layers ' ))
63
+ self .addParameter (ParameterRaster (self .GRIDS , 'Main input layer ' ))
63
64
self .addParameter (ParameterMultipleInput (self .XGRIDS , 'Additional layers' ,
64
65
ParameterMultipleInput .TYPE_RASTER , True ))
65
66
self .addParameter (ParameterString (self .FORMULA , "Formula" ))
66
67
self .addOutput (OutputRaster (self .RESULT , "Result" ))
67
68
68
-
69
- #===========================================================================
70
- # def processAlgorithm(self, progress):
71
- # xgrids = self.getParameterValue(self.XGRIDS)
72
- # layers = xgrids.split(';')
73
- # grid = layers[0]
74
- # self.setParameterValue(self.GRIDS, grid)
75
- # xgrids = ";".join(layers[1:])
76
- # if xgrids == "": xgrids = None
77
- # self.setParameterValue(self.XGRIDS, xgrids)
78
- # SagaAlgorithm.processAlgorithm(self, progress)
79
- #===========================================================================
0 commit comments