File: qgsremappingproxyfeaturesink.sip.in

package info (click to toggle)
qgis 3.40.11%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,183,800 kB
  • sloc: cpp: 1,595,841; python: 372,637; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,257; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 154
file content (235 lines) | stat: -rw-r--r-- 7,107 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/qgsremappingproxyfeaturesink.h                              *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/




class QgsRemappingSinkDefinition
{
%Docstring(signature="appended")
Defines the parameters used to remap features when creating a
:py:class:`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 :py:class:`QgsProperty` source object,
which allows either direct field value to field value mapping or use of
:py:class:`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 :py:class:`QgsProperty` source object,
which allows either direct field value to field value mapping or use of
:py:class:`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 :py:class:`QgsProperty` source object,
which allows either direct field value to field value mapping or use of
:py:class:`QgsExpression` expressions to transform values to the
destination field.

.. seealso:: :py:func:`setFieldMap`

.. seealso:: :py:func:`fieldMap`
%End

    QgsCoordinateReferenceSystem sourceCrs() const;
%Docstring
Returns the source CRS used for reprojecting incoming features to the
sink's destination CRS.

.. seealso:: :py:func:`setSourceCrs`
%End

    void setSourceCrs( const QgsCoordinateReferenceSystem &source );
%Docstring
Sets the ``source`` crs used for reprojecting incoming features to the
sink's destination CRS.

.. seealso:: :py:func:`sourceCrs`
%End

    QgsCoordinateReferenceSystem destinationCrs() const;
%Docstring
Returns the destination CRS used for reprojecting incoming features to
the sink's destination CRS.

.. seealso:: :py:func:`setDestinationCrs`
%End

    void setDestinationCrs( const QgsCoordinateReferenceSystem &destination );
%Docstring
Sets the ``destination`` crs used for reprojecting incoming features to
the sink's destination CRS.

.. seealso:: :py:func:`destinationCrs`
%End

    Qgis::WkbType destinationWkbType() const;
%Docstring
Returns the WKB geometry type for the destination.

.. seealso:: :py:func:`setDestinationWkbType`
%End

    void setDestinationWkbType( Qgis::WkbType 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

    QVariant toVariant() const;
%Docstring
Saves this remapping definition to a QVariantMap, wrapped in a QVariant.
You can use :py:class:`QgsXmlUtils`.writeVariant to save it to an XML
document.

.. seealso:: :py:func:`loadVariant`
%End

    bool loadVariant( const QVariantMap &map );
%Docstring
Loads this remapping definition from a QVariantMap, wrapped in a
QVariant. You can use :py:class:`QgsXmlUtils`.readVariant to load it
from an XML document.

.. seealso:: :py:func:`toVariant`
%End

    bool operator==( const QgsRemappingSinkDefinition &other ) const;
    bool operator!=( const QgsRemappingSinkDefinition &other ) const;

};




class QgsRemappingProxyFeatureSink : QgsFeatureSink
{
%Docstring(signature="appended")
A :py:class:`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

    ~QgsRemappingProxyFeatureSink();

    void setExpressionContext( const QgsExpressionContext &context ) const;
%Docstring
Sets the expression ``context`` to use when evaluating mapped field
values.
%End

    void setTransformContext( const QgsCoordinateTransformContext &context );
%Docstring
Sets the transform ``context`` to use when reprojecting features.
%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 = QgsFeatureSink::Flags() );

    virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() );

    virtual bool addFeatures( QgsFeatureIterator &iterator, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() );

    virtual QString lastError() const;


    QgsFeatureSink *destinationSink();
%Docstring
Returns the destination :py:class:`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.py again   *
 ************************************************************************/