mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
[processing] minor code cleaning
This commit is contained in:
parent
f661f80bdb
commit
2dbe2da7e3
@ -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 PyQt4 import QtGui
|
||||
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 @@ class RasterCalculator(SagaAlgorithm):
|
||||
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)
|
||||
#===========================================================================
|
||||
|
Loading…
x
Reference in New Issue
Block a user