Class: QgsProcessingParameterVectorTileWriterLayers

class qgis.core.QgsProcessingParameterVectorTileWriterLayers(name: str, description: str = '')

Bases: QgsProcessingParameterDefinition

Constructor for QgsProcessingParameterVectorTileWriterLayers.

QgsProcessingParameterVectorTileWriterLayers(QgsProcessingParameterVectorTileWriterLayers)

A parameter for processing algorithms that need a list of input vector layers for writing of vector tiles - this parameter provides processing framework’s adapter for QList<QgsVectorTileWriter.Layer>.

A valid value for this parameter is a list (QVariantList), where each item is a map (QVariantMap) in this form: { ‘layer’: string or QgsMapLayer, // key-value pairs below are optional ‘layerName’: string, ‘filterExpression’: string, ‘minZoom’: int, ‘maxZoom’: int }

Static functions parametersAsLayers(), variantMapAsLayer(), layerAsVariantMap() provide conversion between QgsVectorTileWriter.Layer representation and QVariant representation.

Note

This class is not a part of public API.

Methods

asPythonString

param outputType

checkValueIsAcceptable

param input

clone

rtype

QgsProcessingParameterDefinition

layerAsVariantMap

Converts a single input layer to QVariant representation (a QVariantMap)

parameterAsLayers

Converts a QVariant value (a QVariantList) to a list of input layers

type

rtype

str

typeName

Returns the type name for the parameter class.

valueAsPythonString

param value

variantMapAsLayer

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
Return type

bool

clone(self)QgsProcessingParameterDefinition
Return type

QgsProcessingParameterDefinition

layerAsVariantMap(layer: QgsVectorTileWriter.Layer)Dict[str, Any]

Converts a single input layer to QVariant representation (a QVariantMap)

Parameters

layer (QgsVectorTileWriter.Layer) –

Return type

Dict[str, Any]

parameterAsLayers(layersVariant: Any, context: QgsProcessingContext)List[QgsVectorTileWriter.Layer]

Converts a QVariant value (a QVariantList) to a list of input layers

Parameters
Return type

List[QgsVectorTileWriter.Layer]

type(self)str
Return type

str

typeName()str

Returns the type name for the parameter class.

Return type

str

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

str

variantMapAsLayer(layerVariantMap: Dict[str, Any], context: QgsProcessingContext)QgsVectorTileWriter.Layer

Converts a QVariant value (a QVariantMap) to a single input layer

Parameters
Return type

QgsVectorTileWriter.Layer