Class: QgsProcessingParameterRasterLayer

class qgis.core.QgsProcessingParameterRasterLayer

Bases: QgsProcessingParameterDefinition, QgsFileFilterGenerator

A raster layer parameter for processing algorithms.

New in version 3.0.

QgsProcessingParameterRasterLayer(name: str, description: str = ‘’, defaultValue: Any = None, optional: bool = False) Constructor for QgsProcessingParameterRasterLayer.

QgsProcessingParameterRasterLayer(QgsProcessingParameterRasterLayer)

Methods

checkValueIsAcceptable

param input

clone

rtype

QgsProcessingParameterDefinition

createFileFilter

rtype

str

fromScriptCode

Creates a new parameter using the definition from a script code.

type

rtype

str

typeName

Returns the type name for the parameter class.

valueAsJsonObject

param value

valueAsPythonString

param value

valueAsString

param value

checkValueIsAcceptable(self, input: Any, context: QgsProcessingContext = None) bool
Parameters
Return type

bool

clone(self) QgsProcessingParameterDefinition
Return type

QgsProcessingParameterDefinition

createFileFilter(self) str
Return type

str

fromScriptCode(name: str, description: str, isOptional: bool, definition: str) QgsProcessingParameterRasterLayer

Creates a new parameter using the definition from a script code.

Parameters
  • name (str) –

  • description (str) –

  • isOptional (bool) –

  • definition (str) –

Return type

QgsProcessingParameterRasterLayer

type(self) str
Return type

str

typeName() str

Returns the type name for the parameter class.

Return type

str

valueAsJsonObject(self, value: Any, context: QgsProcessingContext) Any
Parameters
Return type

Any

valueAsPythonString(self, value: Any, context: QgsProcessingContext) str
Parameters
Return type

str

valueAsString(self, value: Any, context: QgsProcessingContext) Tuple[str, bool]
Parameters
Return type

Tuple[str, bool]