Skip to content
Permalink
Browse files
[processing] Changed raster calculator to ask main layer separately
  • Loading branch information
volaya committed Jul 13, 2014
1 parent 6475043 commit 0e76df60b4e62d6319477534b7577e3414456b97
Showing with 14 additions and 14 deletions.
  1. +14 −14 python/plugins/processing/algs/saga/RasterCalculator.py
@@ -58,22 +58,22 @@ def defineCharacteristics(self):
self.name = 'Raster calculator'
self.cmdname = 'Grid Calculator'
self.undecoratedGroup = "grid_calculus"
self.group = SagaGroupNameDecorator.getDecoratedName(self.undecoratedGroup)
grids = ParameterRaster(self.GRIDS, 'Input layers', True)
grids.hidden = True
self.addParameter(grids)
self.addParameter(ParameterMultipleInput(self.XGRIDS, 'Input layers',
self.group = SagaGroupNameDecorator.getDecoratedName(self.undecoratedGroup)
self.addParameter(ParameterRaster(self.GRIDS, 'Main input layers'))
self.addParameter(ParameterMultipleInput(self.XGRIDS, 'Additional layers',
ParameterMultipleInput.TYPE_RASTER, False))
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)
#===========================================================================
# 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 0e76df6

Please sign in to comment.