Subgroup: Processing

Class: QgsProcessingParameterVectorDestination

class qgis.core.QgsProcessingParameterVectorDestination

Bases: qgis._core.QgsProcessingDestinationParameter

A vector layer destination parameter, for specifying the destination path for a vector layer created by the algorithm.

Note

Consider using the more flexible QgsProcessingParameterFeatureSink wherever possible.

New in version 3.0: Methods

algorithm Returns a pointer to the algorithm which owns this parameter.
asScriptCode
checkValueIsAcceptable
clone
createByDefault Returns true if the destination should be created by default.
dataType Returns the layer type for this created vector layer.
defaultFileExtension
defaultValue Returns the default value for the parameter.
dependsOnOtherParameters Returns a list of other parameter names on which this parameter is dependent (e.g.
description Returns the description for the parameter.
dynamicLayerParameterName Returns the name of the parameter for a layer linked to a dynamic parameter, or an empty string if this is not set.
dynamicPropertyDefinition Returns the property definition for dynamic properties.
flags Returns any flags associated with the parameter.
fromScriptCode Creates a new parameter using the definition from a script code.
fromVariantMap
generateTemporaryDestination Generates a temporary destination value for this parameter.
hasGeometry Returns true if the created layer is likely to include geometries.
isDestination
isDynamic Returns true if the parameter supports is dynamic, and can support data-defined values (i.e.
metadata Returns the parameter’s freeform metadata.
name Returns the name of the parameter.
provider Returns a pointer to the provider for the algorithm which owns this parameter.
setCreateByDefault Sets whether the destination should be created by default.
setDataType Sets the layer type for the created vector layer.
setDefaultValue Sets the default value for the parameter.
setDescription Sets the description for the parameter.
setDynamicLayerParameterName Sets the name for the parameter for a layer linked to a dynamic parameter, or an empty string if this is not set.
setDynamicPropertyDefinition Sets the property definition for dynamic properties.
setFlags Sets the flags associated with the parameter.
setIsDynamic Sets whether the parameter is dynamic, and can support data-defined values (i.e.
setMetadata Sets the parameter’s freeform metadata.
setName Sets the name of the parameter.
setSupportsNonFileBasedOutputs Sets whether the destination parameter supports non filed-based outputs, such as memory layers or direct database outputs.
supportsNonFileBasedOutputs Returns true if the destination parameter supports non filed-based outputs, such as memory layers or direct database outputs.
toOutputDefinition
toVariantMap
toolTip Returns a formatted tooltip for use with the parameter, which gives helpful information like parameter description, ID, and extra content like default values (depending on parameter type).
type
typeName Returns the type name for the parameter class.
valueAsPythonString

Attributes

FlagAdvanced
FlagHidden
FlagOptional
asScriptCode(self) → str
checkValueIsAcceptable(self, input: Any, context: QgsProcessingContext = None) → bool
clone(self) → QgsProcessingParameterDefinition
dataType(self) → QgsProcessing.SourceType

Returns the layer type for this created vector layer.

See also

setDataType()

defaultFileExtension(self) → str
fromScriptCode(name: str, description: str, isOptional: bool, definition: str) → QgsProcessingParameterVectorDestination

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

fromVariantMap(self, map: Dict[str, Any]) → bool
hasGeometry(self) → bool

Returns true if the created layer is likely to include geometries. In cases were presence of geometry cannot be reliably determined in advance, this method will default to returning true.

setDataType(self, type: QgsProcessing.SourceType)

Sets the layer type for the created vector layer.

See also

dataType()

toOutputDefinition(self) → QgsProcessingOutputDefinition
toVariantMap(self) → Dict[str, Any]
type(self) → str
typeName() → str

Returns the type name for the parameter class.

valueAsPythonString(self, value: Any, context: QgsProcessingContext) → str