QGIS API Documentation
3.22.4-Białowieża (ce8e65e95e)
|
A QgsFeatureSink which proxies incoming features to a destination feature sink, after applying transformations and field value mappings. More...
#include <qgsremappingproxyfeaturesink.h>
Public Member Functions | |
QgsRemappingProxyFeatureSink (const QgsRemappingSinkDefinition &mappingDefinition, QgsFeatureSink *sink, bool ownsSink=false) | |
Constructor for QgsRemappingProxyFeatureSink, using the specified mappingDefinition to manipulate features before sending them to the destination sink. More... | |
~QgsRemappingProxyFeatureSink () override | |
bool | addFeature (QgsFeature &feature, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags()) override |
Adds a single feature to the sink. More... | |
bool | addFeatures (QgsFeatureIterator &iterator, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags()) override |
Adds all features from the specified iterator to the sink. More... | |
bool | addFeatures (QgsFeatureList &features, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags()) override |
Adds a list of features to the sink. More... | |
QgsFeatureSink * | destinationSink () |
Returns the destination QgsFeatureSink which the proxy will forward features to. More... | |
QString | lastError () const override |
Returns the most recent error encountered by the sink, e.g. More... | |
QgsFeatureList | remapFeature (const QgsFeature &feature) const |
Remaps a feature to a set of features compatible with the destination sink. More... | |
void | setExpressionContext (const QgsExpressionContext &context) |
Sets the expression context to use when evaluating mapped field values. More... | |
void | setTransformContext (const QgsCoordinateTransformContext &context) |
Sets the transform context to use when reprojecting features. More... | |
Public Member Functions inherited from QgsFeatureSink | |
virtual | ~QgsFeatureSink ()=default |
virtual bool | flushBuffer () |
Flushes any internal buffer which may exist in the sink, causing any buffered features to be added to the sink's destination. More... | |
Additional Inherited Members | |
Public Types inherited from QgsFeatureSink | |
enum | Flag { FastInsert = 1 << 1 , RollBackOnErrors = 1 << 2 } |
Flags controlling how features are added to a sink. More... | |
enum | SinkFlag { RegeneratePrimaryKey = 1 << 1 } |
Flags that can be set on a QgsFeatureSink. More... | |
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.
Definition at line 180 of file qgsremappingproxyfeaturesink.h.
QgsRemappingProxyFeatureSink::QgsRemappingProxyFeatureSink | ( | const QgsRemappingSinkDefinition & | mappingDefinition, |
QgsFeatureSink * | sink, | ||
bool | ownsSink = false |
||
) |
Constructor for QgsRemappingProxyFeatureSink, using the specified mappingDefinition to manipulate features before sending them to the destination sink.
Ownership of sink is dictated by ownsSink. If ownsSink is false
, ownership is not transferred, and callers must ensure that sink exists for the lifetime of this object. If ownsSink is true
, then this object will take ownership of sink.
Definition at line 21 of file qgsremappingproxyfeaturesink.cpp.
|
override |
Definition at line 28 of file qgsremappingproxyfeaturesink.cpp.
|
overridevirtual |
Adds a single feature to the sink.
Feature addition behavior is controlled by the specified flags.
true
in case of success and false
in case of failure Reimplemented from QgsFeatureSink.
Definition at line 106 of file qgsremappingproxyfeaturesink.cpp.
|
overridevirtual |
Adds all features from the specified iterator to the sink.
Feature addition behavior is controlled by the specified flags.
true
if all features were added successfully, or false
if any feature could not be added Reimplemented from QgsFeatureSink.
Definition at line 122 of file qgsremappingproxyfeaturesink.cpp.
|
overridevirtual |
Adds a list of features to the sink.
Feature addition behavior is controlled by the specified flags.
true
in case of success and false
in case of failure Implements QgsFeatureSink.
Definition at line 112 of file qgsremappingproxyfeaturesink.cpp.
|
inline |
Returns the destination QgsFeatureSink which the proxy will forward features to.
Definition at line 229 of file qgsremappingproxyfeaturesink.h.
|
overridevirtual |
Returns the most recent error encountered by the sink, e.g.
when a call to addFeatures() returns false
.
Reimplemented from QgsFeatureSink.
Definition at line 133 of file qgsremappingproxyfeaturesink.cpp.
QgsFeatureList QgsRemappingProxyFeatureSink::remapFeature | ( | const QgsFeature & | feature | ) | const |
Remaps a feature to a set of features compatible with the destination sink.
Definition at line 44 of file qgsremappingproxyfeaturesink.cpp.
void QgsRemappingProxyFeatureSink::setExpressionContext | ( | const QgsExpressionContext & | context | ) |
Sets the expression context to use when evaluating mapped field values.
Definition at line 34 of file qgsremappingproxyfeaturesink.cpp.
void QgsRemappingProxyFeatureSink::setTransformContext | ( | const QgsCoordinateTransformContext & | context | ) |
Sets the transform context to use when reprojecting features.
Definition at line 39 of file qgsremappingproxyfeaturesink.cpp.