Class: QgsProcessingParameterVectorDestination¶
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.
Class Hierarchy¶
Base classes¶
Base class for all parameter definitions which represent file or layer destinations, e.g. parameters which are used for the destination for layers output by an algorithm. |
|
Base class for the definition of processing parameters. |
|
Abstract interface for classes which generate a file filter string. |
Methods
Returns the layer type for this created vector layer. |
|
Returns |
|
Sets the layer type for the created vector layer. |
Virtual Methods
In PyQGIS, only methods marked as virtual
can be safely overridden in a Python subclass of QgsProcessingParameterVectorDestination. See the FAQ for more details.
Returns a list of the vector format file extensions supported by this parameter. |
Static Methods
Creates a new parameter using the definition from a script code. |
|
Returns the type name for the parameter class. |
- class qgis.core.QgsProcessingParameterVectorDestination[source]¶
Bases:
QgsProcessingDestinationParameter
- __init__(name: str | None, description: str | None = '', type: Qgis.ProcessingSourceType = Qgis.ProcessingSourceType.VectorAnyGeometry, defaultValue: Any = None, optional: bool = False, createByDefault: bool = True)
Constructor for QgsProcessingParameterVectorDestination.
If
createByDefault
isFalse
and the parameter isoptional
, then this destination output will not be created by default.- Parameters:
name (Optional[str])
description (Optional[str] = '')
type (Qgis.ProcessingSourceType = Qgis.ProcessingSourceType.VectorAnyGeometry)
defaultValue (Any = None)
optional (bool = False)
createByDefault (bool = True)
- __init__(a0: QgsProcessingParameterVectorDestination)
- Parameters:
- dataType(self) Qgis.ProcessingSourceType [source]¶
Returns the layer type for this created vector layer.
See also
- Return type:
- static fromScriptCode(name: str | None, description: str | None, isOptional: bool, definition: str | None) QgsProcessingParameterVectorDestination | None [source]¶
Creates a new parameter using the definition from a script code.
- Parameters:
name (Optional[str])
description (Optional[str])
isOptional (bool)
definition (Optional[str])
- Return type:
Optional[QgsProcessingParameterVectorDestination]
- hasGeometry(self) bool [source]¶
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 returningTrue
.- Return type:
bool
- setDataType(self, type: Qgis.ProcessingSourceType)[source]¶
Sets the layer
type
for the created vector layer.See also
- Parameters:
type (Qgis.ProcessingSourceType)