parameters: (self, parameters, context)
return_statement: return super(SagaAlgorithm, self).checkParameterValues(parameters, context)
docstring: We check that there are no multiband layers, which are not
          supported by SAGA, and that raster layers have the same grid extent
docstring_summary: We check that there are no multiband layers, which are not
          supported by SAGA, and that raster layers have the same grid extent
docstring_tokens: We check that there are no multiband layers which are not supported by SAGA and that raster layers have the same grid extent
function: def checkParameterValues(self, parameters, context):
          """
          We check that there are no multiband layers, which are not
          supported by SAGA, and that raster layers have the same grid extent
          """
          extent = None
          raster_layer_params = []
          for param in self.parameterDefinitions():
              if param not in parameters or parameters[param.name()] is None:
                  continue
  
              if isinstance(param, QgsProcessingParameterRasterLayer):
                  raster_layer_params.append(param.name())
              elif (isinstance(param, QgsProcessingParameterMultipleLayers)
                      and param.layerType() == QgsProcessing.TypeRaster):
                  raster_layer_params.extend(param.name())
  
          for layer_param in raster_layer_params:
              layer = self.parameterAsRasterLayer(parameters, layer_param, context)
  
              if layer is None:
                  continue
              if layer.bandCount() > 1:
                  return False, self.tr('Input layer {0} has more than one band.\n'
                                        'Multiband layers are not supported by SAGA').format(layer.name())
              if not self.allow_nonmatching_grid_extents:
                  if extent is None:
                      extent = (layer.extent(), layer.height(), layer.width())
                  else:
                      extent2 = (layer.extent(), layer.height(), layer.width())
                      if extent != extent2:
                          return False, self.tr("Input layers do not have the same grid extent.")
          return super(SagaAlgorithm, self).checkParameterValues(parameters, context)
function_tokens: def checkParameterValues ( self , parameters , context ) : extent = None raster_layer_params = [ ] for param in self . parameterDefinitions ( ) : if param not in parameters or parameters [ param . name ( ) ] is None : continue if isinstance ( param , QgsProcessingParameterRasterLayer ) : raster_layer_params . append ( param . name ( ) ) elif ( isinstance ( param , QgsProcessingParameterMultipleLayers ) and param . layerType ( ) == QgsProcessing . TypeRaster ) : raster_layer_params . extend ( param . name ( ) ) for layer_param in raster_layer_params : layer = self . parameterAsRasterLayer ( parameters , layer_param , context ) if layer is None : continue if layer . bandCount ( ) > 1 : return False , self . tr ( 'Input layer {0} has more than one band.\n' 'Multiband layers are not supported by SAGA' ) . format ( layer . name ( ) ) if not self . allow_nonmatching_grid_extents : if extent is None : extent = ( layer . extent ( ) , layer . height ( ) , layer . width ( ) ) else : extent2 = ( layer . extent ( ) , layer . height ( ) , layer . width ( ) ) if extent != extent2 : return False , self . tr ( "Input layers do not have the same grid extent." ) return super ( SagaAlgorithm , self ) . checkParameterValues ( parameters , context )