Skip to content

Commit bd6d22d

Browse files
committed
Update sip bindings
1 parent caad989 commit bd6d22d

11 files changed

+34
-7
lines changed

python/core/geometry/qgsabstractgeometryv2.sip

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,12 @@ class QgsAbstractGeometryV2
306306
*/
307307
virtual QgsAbstractGeometryV2* segmentize() const /Factory/;
308308

309+
/** Returns the geometry converted to the more generic curve type.
310+
E.g. QgsLineStringV2 -> QgsCompoundCurveV2, QgsPolygonV2 -> QgsCurvePolygonV2,
311+
QgsMultiLineStringV2 -> QgsMultiCurveV2, QgsMultiPolygonV2 -> QgsMultiSurfaceV2
312+
@return the converted geometry. Caller takes ownership*/
313+
virtual QgsAbstractGeometryV2* toCurveType() const /Factory/;
314+
309315
/** Returns approximate angle at a vertex. This is usually the average angle between adjacent
310316
* segments, and can be pictured as the orientation of a line following the curvature of the
311317
* geometry at the specified vertex.

python/core/geometry/qgslinestringv2.sip

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ class QgsLineStringV2: public QgsCurveV2
106106
*/
107107
QPolygonF asQPolygonF() const;
108108

109+
/** Returns the geometry converted to the more generic curve type QgsCompoundCurveV2
110+
@return the converted geometry. Caller takes ownership*/
111+
QgsAbstractGeometryV2* toCurveType() const /Factory/;
112+
109113
//reimplemented methods
110114

111115
virtual QString geometryType() const;

python/core/geometry/qgsmultilinestringv2.sip

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ class QgsMultiLineStringV2: public QgsMultiCurveV2
2020
/** Adds a geometry and takes ownership. Returns true in case of success*/
2121
virtual bool addGeometry( QgsAbstractGeometryV2* g );
2222

23+
/** Returns the geometry converted to the more generic curve type QgsMultiCurveV2
24+
@return the converted geometry. Caller takes ownership*/
25+
QgsAbstractGeometryV2* toCurveType() const /Factory/;
26+
2327
protected:
2428

2529
virtual bool wktOmitChildType() const;

python/core/geometry/qgsmultipolygonv2.sip

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ class QgsMultiPolygonV2: public QgsMultiSurfaceV2
2020
/** Adds a geometry and takes ownership. Returns true in case of success*/
2121
virtual bool addGeometry( QgsAbstractGeometryV2* g );
2222

23+
/** Returns the geometry converted to the more generic curve type QgsMultiSurfaceV2
24+
@return the converted geometry. Caller takes ownership*/
25+
QgsAbstractGeometryV2* toCurveType() const /Factory/;
26+
2327
protected:
2428

2529
virtual bool wktOmitChildType() const;

python/core/geometry/qgspolygonv2.sip

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ class QgsPolygonV2: public QgsCurvePolygonV2
2626

2727
QgsPolygonV2* surfaceToPolygon() const;
2828

29+
/** Returns the geometry converted to the more generic curve type QgsCurvePolygonV2
30+
@return the converted geometry. Caller takes ownership*/
31+
QgsAbstractGeometryV2* toCurveType() const /Factory/;
32+
2933
void addInteriorRing( QgsCurveV2* ring /Transfer/ );
3034
//overridden to handle LineString25D rings
3135
virtual void setExteriorRing( QgsCurveV2* ring /Transfer/ );

src/core/geometry/qgsabstractgeometryv2.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,8 @@ class CORE_EXPORT QgsAbstractGeometryV2
294294

295295
/** Returns the geometry converted to the more generic curve type.
296296
E.g. QgsLineStringV2 -> QgsCompoundCurveV2, QgsPolygonV2 -> QgsCurvePolygonV2,
297-
QgsMultiLineStringV2 -> QgsMultiCurveV2, QgsMultiPolygonV2 -> QgsMultiSurfaceV2*/
297+
QgsMultiLineStringV2 -> QgsMultiCurveV2, QgsMultiPolygonV2 -> QgsMultiSurfaceV2
298+
@return the converted geometry. Caller takes ownership*/
298299
virtual QgsAbstractGeometryV2* toCurveType() const { return 0; }
299300

300301
/** Returns approximate angle at a vertex. This is usually the average angle between adjacent

src/core/geometry/qgslinestringv2.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ class CORE_EXPORT QgsLineStringV2: public QgsCurveV2
132132
*/
133133
QPolygonF asQPolygonF() const;
134134

135-
/** Returns the geometry converted to QgsCompoundCurveV2*/
135+
/** Returns the geometry converted to the more generic curve type QgsCompoundCurveV2
136+
@return the converted geometry. Caller takes ownership*/
136137
QgsAbstractGeometryV2* toCurveType() const override;
137138

138139
//reimplemented methods

src/core/geometry/qgsmultilinestringv2.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ class CORE_EXPORT QgsMultiLineStringV2: public QgsMultiCurveV2
4242
/** Adds a geometry and takes ownership. Returns true in case of success*/
4343
virtual bool addGeometry( QgsAbstractGeometryV2* g ) override;
4444

45-
/** Returns the geometry converted to QgsMultiCurveV2*/
45+
/** Returns the geometry converted to the more generic curve type QgsMultiCurveV2
46+
@return the converted geometry. Caller takes ownership*/
4647
QgsAbstractGeometryV2* toCurveType() const override;
4748

4849
protected:

src/core/geometry/qgsmultipolygonv2.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ class CORE_EXPORT QgsMultiPolygonV2: public QgsMultiSurfaceV2
4343
/** Adds a geometry and takes ownership. Returns true in case of success*/
4444
virtual bool addGeometry( QgsAbstractGeometryV2* g ) override;
4545

46-
/** Returns the geometry converted to QgsMultiSurfaceV2*/
46+
/** Returns the geometry converted to the more generic curve type QgsMultiSurfaceV2
47+
@return the converted geometry. Caller takes ownership*/
4748
QgsAbstractGeometryV2* toCurveType() const override;
4849

4950
protected:

src/core/geometry/qgspolygonv2.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ class CORE_EXPORT QgsPolygonV2: public QgsCurvePolygonV2
5050

5151
QgsPolygonV2* surfaceToPolygon() const override;
5252

53-
/** Returns the geometry converted to QgsCurvePolygonV2*/
53+
/** Returns the geometry converted to the more generic curve type QgsCurvePolygonV2
54+
@return the converted geometry. Caller takes ownership*/
5455
QgsAbstractGeometryV2* toCurveType() const override;
5556

5657
void addInteriorRing( QgsCurveV2* ring ) override;

0 commit comments

Comments
 (0)