File: qgscircularstring.sip.in

package info (click to toggle)
qgis 3.40.13%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 1,185,160 kB
  • sloc: cpp: 1,615,781; python: 372,865; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,829; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 155
file content (248 lines) | stat: -rw-r--r-- 8,320 bytes parent folder | download | duplicates (16)
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
236
237
238
239
240
241
242
243
244
245
246
247
248
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/geometry/qgscircularstring.h                                *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/






class QgsCircularString: QgsCurve
{
%Docstring(signature="appended")
Circular string geometry type
%End

%TypeHeaderCode
#include "qgscircularstring.h"
%End
  public:

    QgsCircularString() /HoldGIL/;
%Docstring
Constructs an empty circular string.
%End

    QgsCircularString( const QgsPoint &p1,
                       const QgsPoint &p2,
                       const QgsPoint &p3 ) /HoldGIL/;
%Docstring
Constructs a circular string with a single arc passing through ``p1``,
``p2`` and ``p3``.

.. versionadded:: 3.2
%End

    QgsCircularString( const QVector<double> &x, const QVector<double> &y,
                       const QVector<double> &z = QVector<double>(),
                       const QVector<double> &m = QVector<double>() ) /HoldGIL/;
%Docstring
Construct a circular string from arrays of coordinates. If the z or m
arrays are non-empty then the resultant circular string will have z and
m types accordingly.

This constructor is more efficient then calling
:py:func:`~QgsCircularString.setPoints`.

If the sizes of ``x`` and ``y`` are non-equal then the resultant
circular string will be created using the minimum size of these arrays.

.. warning::

   It is the caller's responsibility to ensure that the supplied arrays
   are of odd sizes.

.. versionadded:: 3.20
%End


    static QgsCircularString fromTwoPointsAndCenter( const QgsPoint &p1,
        const QgsPoint &p2,
        const QgsPoint &center,
        bool useShortestArc = true );
%Docstring
Creates a circular string with a single arc representing the curve from
``p1`` to ``p2`` with the specified ``center``.

If ``useShortestArc`` is ``True``, then the arc returned will be that
corresponding to the shorter arc from ``p1`` to ``p2``. If it is
``False``, the longer arc from ``p1`` to ``p2`` will be used (i.e.
winding the other way around the circle).

.. versionadded:: 3.2
%End


  public:
    virtual bool fuzzyEqual( const QgsAbstractGeometry &other, double epsilon = 1e-8 ) const /HoldGIL/;

    virtual bool fuzzyDistanceEqual( const QgsAbstractGeometry &other, double epsilon = 1e-8 ) const /HoldGIL/;

    virtual bool equals( const QgsCurve &other ) const;


    virtual QString geometryType() const /HoldGIL/;

    virtual int dimension() const /HoldGIL/;

    virtual QgsCircularString *clone() const /Factory/;

    virtual void clear();


    virtual bool fromWkb( QgsConstWkbPtr &wkb );

    virtual bool fromWkt( const QString &wkt );


    virtual int wkbSize( QgsAbstractGeometry::WkbFlags flags = QgsAbstractGeometry::WkbFlags() ) const;

    virtual QByteArray asWkb( QgsAbstractGeometry::WkbFlags flags = QgsAbstractGeometry::WkbFlags() ) const;

    virtual QString asWkt( int precision = 17 ) const;

    virtual QDomElement asGml2( QDomDocument &doc, int precision = 17, const QString &ns = "gml", QgsAbstractGeometry::AxisOrder axisOrder = QgsAbstractGeometry::AxisOrder::XY ) const;

    virtual QDomElement asGml3( QDomDocument &doc, int precision = 17, const QString &ns = "gml", QgsAbstractGeometry::AxisOrder axisOrder = QgsAbstractGeometry::AxisOrder::XY ) const;

    virtual bool isEmpty() const /HoldGIL/;

    virtual bool isValid( QString &error /Out/, Qgis::GeometryValidityFlags flags = Qgis::GeometryValidityFlags() ) const;

    virtual int numPoints() const /HoldGIL/;

    int indexOf( const QgsPoint &point ) const final;

    QgsPoint pointN( int i ) const /HoldGIL/;
%Docstring
Returns the point at index i within the circular string.
%End

    virtual void points( QgsPointSequence &pts /Out/ ) const;


    void setPoints( const QgsPointSequence &points );
%Docstring
Sets the circular string's points
%End

    void append( const QgsCircularString *string );
%Docstring
Appends the contents of another circular ``string`` to the end of this
circular string.

:param string: circular string to append. Ownership is not transferred.

.. warning::

   It is the caller's responsibility to ensure that the first point in the appended
   ``string`` matches the last point in the existing curve, or the result will be undefined.

.. versionadded:: 3.20
%End

    virtual double length() const;

    virtual QgsPoint startPoint() const /HoldGIL/;

    virtual QgsPoint endPoint() const /HoldGIL/;

    virtual QgsLineString *curveToLine( double tolerance = M_PI_2 / 90, SegmentationToleranceType toleranceType = MaximumAngle ) const /Factory/;

    virtual QgsCircularString *snappedToGrid( double hSpacing, double vSpacing, double dSpacing = 0, double mSpacing = 0, bool removeRedundantPoints = false ) const /Factory/;

    virtual QgsAbstractGeometry *simplifyByDistance( double tolerance ) const /Factory/;

    virtual bool removeDuplicateNodes( double epsilon = 4 * DBL_EPSILON, bool useZValues = false );


    virtual void draw( QPainter &p ) const;

    virtual void transform( const QgsCoordinateTransform &ct, Qgis::TransformDirection d = Qgis::TransformDirection::Forward, bool transformZ = false ) throw( QgsCsException );

    virtual void transform( const QTransform &t, double zTranslate = 0.0, double zScale = 1.0, double mTranslate = 0.0, double mScale = 1.0 );

    virtual void addToPainterPath( QPainterPath &path ) const;

    virtual void drawAsPolygon( QPainter &p ) const;

    virtual bool insertVertex( QgsVertexId position, const QgsPoint &vertex );

    virtual bool moveVertex( QgsVertexId position, const QgsPoint &newPos );

    virtual bool deleteVertex( QgsVertexId position );

    virtual double closestSegment( const QgsPoint &pt, QgsPoint &segmentPt /Out/, QgsVertexId &vertexAfter /Out/, int *leftOf /Out/ = 0, double epsilon = 4 * DBL_EPSILON ) const;

    virtual bool pointAt( int node, QgsPoint &point, Qgis::VertexType &type ) const;

    virtual void sumUpArea( double &sum /Out/ ) const;

    virtual bool hasCurvedSegments() const;

    virtual double vertexAngle( QgsVertexId vertex ) const;

    virtual double segmentLength( QgsVertexId startVertex ) const;

    virtual QgsCircularString *reversed() const  /Factory/;

    virtual QgsPoint *interpolatePoint( double distance ) const /Factory/;

    virtual QgsCircularString *curveSubstring( double startDistance, double endDistance ) const /Factory/;

    virtual bool addZValue( double zValue = 0 );

    virtual bool addMValue( double mValue = 0 );

    virtual bool dropZValue();

    virtual bool dropMValue();

    virtual void swapXy();

    virtual double xAt( int index ) const /HoldGIL/;

    virtual double yAt( int index ) const /HoldGIL/;

    virtual double zAt( int index ) const /HoldGIL/;

    virtual double mAt( int index ) const /HoldGIL/;


    virtual bool transform( QgsAbstractGeometryTransformer *transformer, QgsFeedback *feedback = 0 );

    void scroll( int firstVertexIndex ) final;


    virtual QgsCircularString *createEmptyWithSameType() const /Factory/;


    SIP_PYOBJECT __repr__();
%MethodCode
    QString wkt = sipCpp->asWkt();
    if ( wkt.length() > 1000 )
      wkt = wkt.left( 1000 ) + QStringLiteral( "..." );
    QString str = QStringLiteral( "<QgsCircularString: %1>" ).arg( wkt );
    sipRes = PyUnicode_FromString( str.toUtf8().constData() );
%End

  protected:

    int compareToSameClass( const QgsAbstractGeometry *other ) const final;
    virtual QgsBox3D calculateBoundingBox3D() const;


};


/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/geometry/qgscircularstring.h                                *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/