Skip to content

Commit

Permalink
[processing] minor code cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed Oct 7, 2014
1 parent f661f80 commit 2dbe2da
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions python/plugins/processing/algs/saga/RasterCalculator.py
Expand Up @@ -16,11 +16,7 @@
* *
***************************************************************************
"""
from processing.core.parameters import ParameterMultipleInput
from processing.algs.saga.SagaAlgorithm import SagaAlgorithm
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.parameters import ParameterString
from processing.algs.saga.SagaGroupNameDecorator import SagaGroupNameDecorator


__author__ = 'Victor Olaya'
__date__ = 'May 2014'
Expand All @@ -34,6 +30,11 @@
from processing.core.parameters import ParameterRaster
from processing.core.outputs import OutputRaster
from processing.tools.system import *
from processing.core.parameters import ParameterMultipleInput
from processing.algs.saga.SagaAlgorithm import SagaAlgorithm
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.parameters import ParameterString
from processing.algs.saga.SagaGroupNameDecorator import SagaGroupNameDecorator


class RasterCalculator(SagaAlgorithm):
Expand All @@ -59,21 +60,9 @@ def defineCharacteristics(self):
self.cmdname = 'Grid Calculator'
self.undecoratedGroup = "grid_calculus"
self.group = SagaGroupNameDecorator.getDecoratedName(self.undecoratedGroup)
self.addParameter(ParameterRaster(self.GRIDS, 'Main input layers'))
self.addParameter(ParameterRaster(self.GRIDS, 'Main input layer'))
self.addParameter(ParameterMultipleInput(self.XGRIDS, 'Additional layers',
ParameterMultipleInput.TYPE_RASTER, True))
self.addParameter(ParameterString(self.FORMULA, "Formula"))
self.addOutput(OutputRaster(self.RESULT, "Result"))


#===========================================================================
# def processAlgorithm(self, progress):
# xgrids = self.getParameterValue(self.XGRIDS)
# layers = xgrids.split(';')
# grid = layers[0]
# self.setParameterValue(self.GRIDS, grid)
# xgrids = ";".join(layers[1:])
# if xgrids == "": xgrids = None
# self.setParameterValue(self.XGRIDS, xgrids)
# SagaAlgorithm.processAlgorithm(self, progress)
#===========================================================================

0 comments on commit 2dbe2da

Please sign in to comment.