Class: QgsRemappingProxyFeatureSink¶
A QgsFeatureSink
which proxies incoming features to a
destination feature sink, after applying transformations and field value
mappings.
This sink allows for transformation of incoming features to match the requirements of storing in an existing destination layer, e.g. by reprojecting the features to the destination’s CRS and by coercing geometries to the format required by the destination sink.
Added in version 3.14.
Class Hierarchy¶
Base classes¶
An interface for objects which accept features via addFeature(s) methods. |
Methods
Returns the destination |
|
Remaps a feature to a set of features compatible with the destination sink. |
|
Sets the expression context to use when evaluating mapped field values. |
|
Sets the transform context to use when reprojecting features. |
- class qgis.core.QgsRemappingProxyFeatureSink[source]¶
Bases:
QgsFeatureSink
- __init__(mappingDefinition: QgsRemappingSinkDefinition, sink: QgsFeatureSink | None)
Constructor for QgsRemappingProxyFeatureSink, using the specified
mappingDefinition
to manipulate features before sending them to the destinationsink
.- Parameters:
mappingDefinition (QgsRemappingSinkDefinition)
sink (Optional[QgsFeatureSink])
- __init__(a0: QgsRemappingProxyFeatureSink)
- Parameters:
- destinationSink(self) QgsFeatureSink | None [source]¶
Returns the destination
QgsFeatureSink
which the proxy will forward features to.- Return type:
Optional[QgsFeatureSink]
- remapFeature(self, feature: QgsFeature) List[QgsFeature] [source]¶
Remaps a
feature
to a set of features compatible with the destination sink.- Parameters:
feature (QgsFeature)
- Return type:
List[QgsFeature]
- setExpressionContext(self, context: QgsExpressionContext)[source]¶
Sets the expression
context
to use when evaluating mapped field values.- Parameters:
context (QgsExpressionContext)
- setTransformContext(self, context: QgsCoordinateTransformContext)[source]¶
Sets the transform
context
to use when reprojecting features.- Parameters:
context (QgsCoordinateTransformContext)