Class: 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.

Added in version 3.14.

Class Hierarchy

Inheritance diagram of qgis.core.QgsProcessingParameterVectorTileWriterLayers

Base classes

QgsProcessingParameterDefinition

Base class for the definition of processing parameters.

Static Methods

layerAsVariantMap

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

parameterAsLayers

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

typeName

Returns the type name for the parameter class.

variantMapAsLayer

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

class qgis.core.QgsProcessingParameterVectorTileWriterLayers[source]

Bases: QgsProcessingParameterDefinition

__init__(name: str | None, description: str | None = '')

Constructor for QgsProcessingParameterVectorTileWriterLayers.

Parameters:
  • name (Optional[str])

  • description (Optional[str] = '')

__init__(a0: QgsProcessingParameterVectorTileWriterLayers)
Parameters:

a0 (QgsProcessingParameterVectorTileWriterLayers)

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

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

Parameters:

layer (QgsVectorTileWriter.Layer)

Return type:

Dict[str, Any]

static 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]

static typeName() str[source]

Returns the type name for the parameter class.

Return type:

str

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

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

Parameters:
Return type:

QgsVectorTileWriter.Layer