mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-03 00:02:25 -05:00
171 lines
5.4 KiB
Plaintext
171 lines
5.4 KiB
Plaintext
|
/************************************************************************
|
||
|
* This file has been generated automatically from *
|
||
|
* *
|
||
|
* src/core/qgsremappingproxyfeaturesink.h *
|
||
|
* *
|
||
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||
|
************************************************************************/
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
class QgsRemappingSinkDefinition
|
||
|
{
|
||
|
%Docstring
|
||
|
Defines the parameters used to remap features when creating a QgsRemappingProxyFeatureSink.
|
||
|
|
||
|
The definition includes parameters required to correctly map incoming features to the structure
|
||
|
of the destination sink, e.g. information about how to create output field values and how to transform
|
||
|
geometries to match the destination CRS.
|
||
|
|
||
|
.. versionadded:: 3.14
|
||
|
%End
|
||
|
|
||
|
%TypeHeaderCode
|
||
|
#include "qgsremappingproxyfeaturesink.h"
|
||
|
%End
|
||
|
public:
|
||
|
|
||
|
QMap< QString, QgsProperty > fieldMap() const;
|
||
|
%Docstring
|
||
|
Returns the field mapping, which defines how to map the values from incoming features to destination
|
||
|
field values.
|
||
|
|
||
|
Field values are mapped using a QgsProperty source object, which allows either direct field value to field value
|
||
|
mapping or use of QgsExpression expressions to transform values to the destination field.
|
||
|
|
||
|
.. seealso:: :py:func:`setFieldMap`
|
||
|
|
||
|
.. seealso:: :py:func:`addMappedField`
|
||
|
%End
|
||
|
|
||
|
void setFieldMap( const QMap< QString, QgsProperty > &map );
|
||
|
%Docstring
|
||
|
Sets the field mapping, which defines how to map the values from incoming features to destination
|
||
|
field values.
|
||
|
|
||
|
Field values are mapped using a QgsProperty source object, which allows either direct field value to field value
|
||
|
mapping or use of QgsExpression expressions to transform values to the destination field.
|
||
|
|
||
|
.. seealso:: :py:func:`fieldMap`
|
||
|
|
||
|
.. seealso:: :py:func:`addMappedField`
|
||
|
%End
|
||
|
|
||
|
void addMappedField( const QString &destinationField, const QgsProperty &property );
|
||
|
%Docstring
|
||
|
Adds a mapping for a destination field.
|
||
|
|
||
|
Field values are mapped using a QgsProperty source object, which allows either direct field value to field value
|
||
|
mapping or use of QgsExpression expressions to transform values to the destination field.
|
||
|
|
||
|
.. seealso:: :py:func:`setFieldMap`
|
||
|
|
||
|
.. seealso:: :py:func:`fieldMap`
|
||
|
%End
|
||
|
|
||
|
QgsCoordinateTransform transform() const;
|
||
|
%Docstring
|
||
|
Returns the transform used for reprojecting incoming features to the sink's destination CRS.
|
||
|
|
||
|
.. seealso:: :py:func:`setTransform`
|
||
|
%End
|
||
|
|
||
|
void setTransform( const QgsCoordinateTransform &transform );
|
||
|
%Docstring
|
||
|
Sets the ``transform`` used for reprojecting incoming features to the sink's destination CRS.
|
||
|
|
||
|
.. seealso:: :py:func:`transform`
|
||
|
%End
|
||
|
|
||
|
QgsWkbTypes::Type destinationWkbType() const;
|
||
|
%Docstring
|
||
|
Returns the WKB geometry type for the destination.
|
||
|
|
||
|
.. seealso:: :py:func:`setDestinationWkbType`
|
||
|
%End
|
||
|
|
||
|
void setDestinationWkbType( QgsWkbTypes::Type type );
|
||
|
%Docstring
|
||
|
Sets the WKB geometry ``type`` for the destination.
|
||
|
|
||
|
.. seealso:: :py:func:`setDestinationWkbType`
|
||
|
%End
|
||
|
|
||
|
QgsFields destinationFields() const;
|
||
|
%Docstring
|
||
|
Returns the fields for the destination sink.
|
||
|
|
||
|
.. seealso:: :py:func:`setDestinationFields`
|
||
|
%End
|
||
|
|
||
|
void setDestinationFields( const QgsFields &fields );
|
||
|
%Docstring
|
||
|
Sets the ``fields`` for the destination sink.
|
||
|
|
||
|
.. seealso:: :py:func:`destinationFields`
|
||
|
%End
|
||
|
|
||
|
};
|
||
|
|
||
|
|
||
|
class QgsRemappingProxyFeatureSink : QgsFeatureSink
|
||
|
{
|
||
|
%Docstring
|
||
|
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.
|
||
|
|
||
|
.. versionadded:: 3.14
|
||
|
%End
|
||
|
|
||
|
%TypeHeaderCode
|
||
|
#include "qgsremappingproxyfeaturesink.h"
|
||
|
%End
|
||
|
public:
|
||
|
|
||
|
QgsRemappingProxyFeatureSink( const QgsRemappingSinkDefinition &mappingDefinition, QgsFeatureSink *sink );
|
||
|
%Docstring
|
||
|
Constructor for QgsRemappingProxyFeatureSink, using the specified ``mappingDefinition``
|
||
|
to manipulate features before sending them to the destination ``sink``.
|
||
|
%End
|
||
|
|
||
|
void setExpressionContext( const QgsExpressionContext &context );
|
||
|
%Docstring
|
||
|
Sets the expression ``context`` to use when evaluating mapped field values.
|
||
|
%End
|
||
|
|
||
|
QgsFeatureList remapFeature( const QgsFeature &feature ) const;
|
||
|
%Docstring
|
||
|
Remaps a ``feature`` to a set of features compatible with the destination sink.
|
||
|
%End
|
||
|
|
||
|
virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = 0 );
|
||
|
|
||
|
virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = 0 );
|
||
|
|
||
|
virtual bool addFeatures( QgsFeatureIterator &iterator, QgsFeatureSink::Flags flags = 0 );
|
||
|
|
||
|
|
||
|
QgsFeatureSink *destinationSink();
|
||
|
%Docstring
|
||
|
Returns the destination QgsFeatureSink which the proxy will forward features to.
|
||
|
%End
|
||
|
|
||
|
};
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
/************************************************************************
|
||
|
* This file has been generated automatically from *
|
||
|
* *
|
||
|
* src/core/qgsremappingproxyfeaturesink.h *
|
||
|
* *
|
||
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||
|
************************************************************************/
|