Skip to content
Permalink
Browse files

[processing] minor code cleaning

  • Loading branch information
volaya committed Oct 7, 2014
1 parent f661f80 commit 2dbe2da7e3cef93b4b195d3bb6ede6ecb85bc090
Showing with 7 additions and 18 deletions.
  1. +7 −18 python/plugins/processing/algs/saga/RasterCalculator.py
@@ -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'
@@ -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):
@@ -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.
You can’t perform that action at this time.