Class: QgsProcessingParameterAlignRasterLayers¶
- class qgis.core.QgsProcessingParameterAlignRasterLayers¶
Bases:
QgsProcessingParameterDefinition
A parameter for Processing algorithms that need a list of input raster layers to align - this parameter provides Processing framework’s adapter for QList<
QgsAlignRaster
.Item>.A valid value for this parameter is a list (QVariantList), where each item is a map (QVariantMap) in this form: { ‘inputFile’: string, ‘outputFile’: string, ‘resampleMethod’: int, ‘rescale’: bool, }
Also it can accept lists (either string lists or
QgsMapLayer
list) as well as individual layer object or string representing layer source.Static functions
parametersAsItems()
,variantMapAsItem()
,itemAsVariantMap()
provide conversion betweenQgsAlignRaster
.Item representation and QVariant representation.New in version 3.34.
QgsProcessingParameterAlignRasterLayers(name: str, description: str = ‘’) Constructor for QgsProcessingParameterAlignRasterLayers.
QgsProcessingParameterAlignRasterLayers(
QgsProcessingParameterAlignRasterLayers
)Methods
- param outputType:
- param input:
- rtype:
QgsProcessingParameterDefinition
Default gui value for an algorithm parameter from settings
Converts a single input layer to QVariant representation (a QVariantMap)
Converts a QVariant value (a QVariantList) to a list of input layers
- rtype:
str
Returns the type name for the parameter class.
- param value:
- param value:
- param value:
Converts a QVariant value (a QVariantMap) to a single input layer
- asPythonString(self, outputType: QgsProcessing.PythonOutputType = QgsProcessing.PythonQgsProcessingAlgorithmSubclass) str ¶
- Parameters:
outputType (QgsProcessing.PythonOutputType = QgsProcessing.PythonQgsProcessingAlgorithmSubclass) –
- Return type:
str
- checkValueIsAcceptable(self, input: Any, context: QgsProcessingContext = None) bool ¶
- Parameters:
input (Any) –
context (
QgsProcessingContext
= None) –
- Return type:
bool
- clone(self) QgsProcessingParameterDefinition ¶
- Return type:
- defaultGuiValueFromSetting(self) Any ¶
Default gui value for an algorithm parameter from settings
- Returns:
default value from settings or invalid QVariant if there is no default value defined in the settings
New in version 3.34.
- itemAsVariantMap(item: QgsAlignRasterData.RasterItem) Dict[str, Any] ¶
Converts a single input layer to QVariant representation (a QVariantMap)
- Parameters:
item (QgsAlignRasterData.RasterItem) –
- Return type:
Dict[str, Any]
- parameterAsItems(layersVariant: Any, context: QgsProcessingContext) List[QgsAlignRasterData.RasterItem] ¶
Converts a QVariant value (a QVariantList) to a list of input layers
- Parameters:
layersVariant (Any) –
context (QgsProcessingContext) –
- Return type:
- 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:
value (Any) –
context (QgsProcessingContext) –
- Return type:
Any
- valueAsPythonString(self, value: Any, context: QgsProcessingContext) str ¶
- Parameters:
value (Any) –
context (QgsProcessingContext) –
- Return type:
str
- valueAsString(self, value: Any, context: QgsProcessingContext) Tuple[str, bool] ¶
- Parameters:
value (Any) –
context (QgsProcessingContext) –
- Return type:
Tuple[str, bool]
- variantMapAsItem(layerVariantMap: Dict[str, Any], context: QgsProcessingContext) QgsAlignRasterData.RasterItem ¶
Converts a QVariant value (a QVariantMap) to a single input layer
- Parameters:
layerVariantMap (Dict[str) –
context (QgsProcessingContext) –
- Return type: