-
-
Notifications
You must be signed in to change notification settings - Fork 3k
/
qgsgeometrycollection.sip
197 lines (124 loc) · 5.63 KB
/
qgsgeometrycollection.sip
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
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/geometry/qgsgeometrycollection.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsGeometryCollection: QgsAbstractGeometry
{
%Docstring
Geometry collection
.. versionadded:: 2.10
%End
%TypeHeaderCode
#include "qgsgeometrycollection.h"
%End
public:
QgsGeometryCollection();
QgsGeometryCollection( const QgsGeometryCollection &c );
virtual ~QgsGeometryCollection();
virtual QgsGeometryCollection *clone() const /Factory/;
int numGeometries() const;
%Docstring
Returns the number of geometries within the collection.
:rtype: int
%End
QgsAbstractGeometry *geometryN( int n );
%Docstring
Returns a geometry from within the collection.
\param n index of geometry to return
:rtype: QgsAbstractGeometry
%End
virtual bool isEmpty() const;
virtual int dimension() const;
virtual QString geometryType() const;
virtual void clear();
virtual QgsAbstractGeometry *boundary() const /Factory/;
virtual bool addGeometry( QgsAbstractGeometry *g /Transfer/ );
%Docstring
Adds a geometry and takes ownership. Returns true in case of success.
:rtype: bool
%End
virtual bool insertGeometry( QgsAbstractGeometry *g, int index /Transfer/ );
%Docstring
Inserts a geometry before a specified index and takes ownership. Returns true in case of success.
\param g geometry to insert. Ownership is transferred to the collection.
\param index position to insert geometry before
:rtype: bool
%End
virtual bool removeGeometry( int nr );
%Docstring
Removes a geometry from the collection.
\param nr index of geometry to remove
:return: true if removal was successful.
:rtype: bool
%End
virtual void transform( const QgsCoordinateTransform &ct, QgsCoordinateTransform::TransformDirection d = QgsCoordinateTransform::ForwardTransform,
bool transformZ = false );
virtual void transform( const QTransform &t );
virtual void draw( QPainter &p ) const;
virtual bool fromWkb( QgsConstWkbPtr &wkb );
virtual bool fromWkt( const QString &wkt );
virtual QByteArray asWkb() const;
virtual QString asWkt( int precision = 17 ) const;
virtual QDomElement asGML2( QDomDocument &doc, int precision = 17, const QString &ns = "gml" ) const;
virtual QDomElement asGML3( QDomDocument &doc, int precision = 17, const QString &ns = "gml" ) const;
virtual QString asJSON( int precision = 17 ) const;
virtual QgsRectangle boundingBox() const;
virtual QgsCoordinateSequence coordinateSequence() const;
virtual int nCoordinates() const;
virtual double closestSegment( const QgsPoint &pt, QgsPoint &segmentPt /Out/, QgsVertexId &vertexAfter /Out/, bool *leftOf /Out/, double epsilon ) const;
virtual bool nextVertex( QgsVertexId &id, QgsPoint &vertex /Out/ ) const;
virtual bool insertVertex( QgsVertexId position, const QgsPoint &vertex );
virtual bool moveVertex( QgsVertexId position, const QgsPoint &newPos );
virtual bool deleteVertex( QgsVertexId position );
virtual double length() const;
virtual double area() const;
virtual double perimeter() const;
virtual bool hasCurvedSegments() const;
virtual QgsAbstractGeometry *segmentize( double tolerance = M_PI_2 / 90, SegmentationToleranceType toleranceType = MaximumAngle ) const /Factory/;
%Docstring
Returns a geometry without curves. Caller takes ownership
\param tolerance segmentation tolerance
\param toleranceType maximum segmentation angle or maximum difference between approximation and curve*
:rtype: QgsAbstractGeometry
%End
virtual double vertexAngle( QgsVertexId vertex ) const;
%Docstring
Returns approximate rotation angle for a vertex. Usually average angle between adjacent segments.
\param vertex the vertex id
:return: rotation in radians, clockwise from north
:rtype: float
%End
virtual int vertexCount( int part = 0, int ring = 0 ) const;
virtual int ringCount( int part = 0 ) const;
virtual int partCount() const;
virtual QgsPoint vertexAt( QgsVertexId id ) const;
virtual bool addZValue( double zValue = 0 );
virtual bool addMValue( double mValue = 0 );
virtual bool dropZValue();
virtual bool dropMValue();
virtual QgsGeometryCollection *toCurveType() const /Factory/;
protected:
virtual bool wktOmitChildType() const;
%Docstring
Returns whether child type names are omitted from Wkt representations of the collection
.. versionadded:: 2.12
:rtype: bool
%End
bool fromCollectionWkt( const QString &wkt, const QList<QgsAbstractGeometry *> &subtypes, const QString &defaultChildWkbType = QString() );
%Docstring
Reads a collection from a WKT string.
:rtype: bool
%End
virtual QgsRectangle calculateBoundingBox() const;
virtual void clearCache() const;
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/geometry/qgsgeometrycollection.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/