Class: QgsProcessingOutputLayerDefinition

class qgis.core.QgsProcessingOutputLayerDefinition

Bases: sip.wrapper

Encapsulates settings relating to a feature sink or output raster layer for a processing algorithm.

QgsProcessingOutputLayerDefinition(sink: Optional[str] = ‘’, destinationProject: Optional[QgsProject] = None) Constructor for QgsProcessingOutputLayerDefinition, accepting a static sink/layer string. The destinationProject parameter can be set to a QgsProject instance in which to automatically load the resulting sink/layer after completing processing.

QgsProcessingOutputLayerDefinition(sink: QgsProperty, destinationProject: Optional[QgsProject] = None) Constructor for QgsProcessingOutputLayerDefinition, accepting a QgsProperty sink/layer. The destinationProject parameter can be set to a QgsProject instance in which to automatically load the resulting sink/layer after completing processing.

QgsProcessingOutputLayerDefinition(a0: QgsProcessingOutputLayerDefinition)

Methods

loadVariant

Loads this output layer definition from a QVariantMap, wrapped in a QVariant.

remappingDefinition

Returns the output remapping definition, if useRemapping() is True.

setRemappingDefinition

Sets the remapping definition to use when adding features to the output layer.

toVariant

Saves this output layer definition to a QVariantMap, wrapped in a QVariant.

useRemapping

Returns True if the output uses a remapping definition.

Attributes

createOptions
destinationName
destinationProject
loadVariant(self, map: Dict[str, Any]) bool

Loads this output layer definition from a QVariantMap, wrapped in a QVariant. You can use QgsXmlUtils.readVariant to load it from an XML document.

See also

toVariant()

Added in version 3.2.

Parameters:

map (Dict[str)

Return type:

bool

remappingDefinition(self) QgsRemappingSinkDefinition

Returns the output remapping definition, if useRemapping() is True.

See also

useRemapping()

Added in version 3.14.

Return type:

QgsRemappingSinkDefinition

setRemappingDefinition(self, definition: QgsRemappingSinkDefinition)

Sets the remapping definition to use when adding features to the output layer.

Calling this method will set useRemapping() to True.

See also

useRemapping()

Added in version 3.14.

Parameters:

definition (QgsRemappingSinkDefinition)

sink
toVariant(self) Any

Saves this output layer definition to a QVariantMap, wrapped in a QVariant. You can use QgsXmlUtils.writeVariant to save it to an XML document.

See also

loadVariant()

Added in version 3.2.

Return type:

Any

useRemapping(self) bool

Returns True if the output uses a remapping definition.

Added in version 3.14.

Return type:

bool