Skip to content

Commit b6f46ea

Browse files
committed
Rename QgsPolygonV2 to QgsPolygon
1 parent 81586d2 commit b6f46ea

File tree

65 files changed

+283
-283
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+283
-283
lines changed

python/core/geometry/qgsabstractgeometry.sip

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ class QgsAbstractGeometry
3535
sipType = sipType_QgsCompoundCurve;
3636
else if ( qgsgeometry_cast<QgsTriangle *>( sipCpp ) != nullptr )
3737
sipType = sipType_QgsTriangle;
38-
else if ( qgsgeometry_cast<QgsPolygonV2 *>( sipCpp ) != nullptr )
39-
sipType = sipType_QgsPolygonV2;
38+
else if ( qgsgeometry_cast<QgsPolygon *>( sipCpp ) != nullptr )
39+
sipType = sipType_QgsPolygon;
4040
else if ( qgsgeometry_cast<QgsCurvePolygon *>( sipCpp ) != nullptr )
4141
sipType = sipType_QgsCurvePolygon;
4242
else if ( qgsgeometry_cast<QgsMultiPointV2 *>( sipCpp ) != nullptr )
@@ -396,7 +396,7 @@ Returns the centroid of the geometry
396396
virtual QgsAbstractGeometry *toCurveType() const = 0 /Factory/;
397397
%Docstring
398398
Returns the geometry converted to the more generic curve type.
399-
E.g. QgsLineString -> QgsCompoundCurve, QgsPolygonV2 -> QgsCurvePolygon,
399+
E.g. QgsLineString -> QgsCompoundCurve, QgsPolygon -> QgsCurvePolygon,
400400
QgsMultiLineString -> QgsMultiCurve, QgsMultiPolygonV2 -> QgsMultiSurface
401401
:return: the converted geometry. Caller takes ownership
402402
:rtype: QgsAbstractGeometry

python/core/geometry/qgscurvepolygon.sip

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class QgsCurvePolygon: QgsSurface
6161

6262
virtual double perimeter() const;
6363

64-
virtual QgsPolygonV2 *surfaceToPolygon() const /Factory/;
64+
virtual QgsPolygon *surfaceToPolygon() const /Factory/;
6565

6666
virtual QgsAbstractGeometry *boundary() const /Factory/;
6767

@@ -81,13 +81,13 @@ class QgsCurvePolygon: QgsSurface
8181
:rtype: QgsCurve
8282
%End
8383

84-
virtual QgsPolygonV2 *toPolygon( double tolerance = M_PI_2 / 90, SegmentationToleranceType toleranceType = MaximumAngle ) const /Factory/;
84+
virtual QgsPolygon *toPolygon( double tolerance = M_PI_2 / 90, SegmentationToleranceType toleranceType = MaximumAngle ) const /Factory/;
8585
%Docstring
8686
Returns a new polygon geometry corresponding to a segmentized approximation
8787
of the curve.
8888
\param tolerance segmentation tolerance
8989
\param toleranceType maximum segmentation angle or maximum difference between approximation and curve*
90-
:rtype: QgsPolygonV2
90+
:rtype: QgsPolygon
9191
%End
9292

9393
virtual void setExteriorRing( QgsCurve *ring /Transfer/ );

python/core/geometry/qgsellipse.sip

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,11 @@ The circumference of the ellipse using first approximation of Ramanujan.
202202
:rtype: QgsPointSequence
203203
%End
204204

205-
virtual QgsPolygonV2 *toPolygon( unsigned int segments = 36 ) const /Factory/;
205+
virtual QgsPolygon *toPolygon( unsigned int segments = 36 ) const /Factory/;
206206
%Docstring
207207
Returns a segmented polygon.
208208
\param segments Number of segments used to segment geometry.
209-
:rtype: QgsPolygonV2
209+
:rtype: QgsPolygon
210210
%End
211211

212212
virtual QgsLineString *toLineString( unsigned int segments = 36 ) const /Factory/;
@@ -216,10 +216,10 @@ The circumference of the ellipse using first approximation of Ramanujan.
216216
:rtype: QgsLineString
217217
%End
218218

219-
virtual QgsPolygonV2 *orientedBoundingBox() const /Factory/;
219+
virtual QgsPolygon *orientedBoundingBox() const /Factory/;
220220
%Docstring
221221
Returns the oriented minimal bounding box for the ellipse.
222-
:rtype: QgsPolygonV2
222+
:rtype: QgsPolygon
223223
%End
224224

225225
virtual QgsRectangle boundingBox() const;

python/core/geometry/qgspolygon.sip

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ class QgsPolygonV2: QgsCurvePolygon
2020
#include "qgspolygon.h"
2121
%End
2222
public:
23-
QgsPolygonV2();
23+
QgsPolygon();
2424

2525
virtual QString geometryType() const;
2626

27-
virtual QgsPolygonV2 *clone() const /Factory/;
27+
virtual QgsPolygon *clone() const /Factory/;
2828

2929
virtual void clear();
3030

3131
virtual bool fromWkb( QgsConstWkbPtr &wkb );
3232

3333
virtual QByteArray asWkb() const;
3434

35-
virtual QgsPolygonV2 *surfaceToPolygon() const /Factory/;
35+
virtual QgsPolygon *surfaceToPolygon() const /Factory/;
3636

3737

3838
virtual QgsCurvePolygon *toCurveType() const /Factory/;
@@ -63,7 +63,7 @@ class QgsPolygonV2: QgsCurvePolygon
6363

6464
protected:
6565

66-
virtual QgsPolygonV2 *createEmptyWithSameType() const /Factory/;
66+
virtual QgsPolygon *createEmptyWithSameType() const /Factory/;
6767

6868

6969

python/core/geometry/qgsregularpolygon.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ A regular polygon is empty if radius equal to 0 or number of sides < 3
145145
:rtype: QgsPointSequence
146146
%End
147147

148-
QgsPolygonV2 *toPolygon() const /Factory/;
148+
QgsPolygon *toPolygon() const /Factory/;
149149
%Docstring
150150
Returns as a polygon.
151-
:rtype: QgsPolygonV2
151+
:rtype: QgsPolygon
152152
%End
153153

154154
QgsLineString *toLineString() const /Factory/;

python/core/geometry/qgssurface.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ class QgsSurface: QgsAbstractGeometry
1818
%End
1919
public:
2020

21-
virtual QgsPolygonV2 *surfaceToPolygon() const = 0 /Factory/;
21+
virtual QgsPolygon *surfaceToPolygon() const = 0 /Factory/;
2222
%Docstring
2323
Get a polygon representation of this surface.
2424
Ownership is transferred to the caller.
25-
:rtype: QgsPolygonV2
25+
:rtype: QgsPolygon
2626
%End
2727

2828
virtual QgsRectangle boundingBox() const;

python/core/geometry/qgstriangle.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class QgsTriangle : QgsPolygonV2
6868
virtual QDomElement asGML3( QDomDocument &doc, int precision = 17, const QString &ns = "gml" ) const;
6969

7070

71-
virtual QgsPolygonV2 *surfaceToPolygon() const /Factory/;
71+
virtual QgsPolygon *surfaceToPolygon() const /Factory/;
7272

7373

7474
virtual QgsCurvePolygon *toCurveType() const /Factory/;

python/core/symbology/qgssymbol.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ Generate symbol as image
342342
:rtype: QPolygonF
343343
%End
344344

345-
static void _getPolygon( QPolygonF &pts, QList<QPolygonF> &holes, QgsRenderContext &context, const QgsPolygonV2 &polygon, bool clipToExtent = true );
345+
static void _getPolygon( QPolygonF &pts, QList<QPolygonF> &holes, QgsRenderContext &context, const QgsPolygon &polygon, bool clipToExtent = true );
346346
%Docstring
347347
Creates a polygon in screen coordinates from a QgsPolygonXYin map coordinates
348348
%End

python/plugins/processing/algs/qgis/GeometryConvert.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,22 +206,22 @@ def convertToPolygon(self, geom):
206206
points.append(p)
207207
linestring = QgsLineString(points)
208208
linestring.close()
209-
p = QgsPolygonV2()
209+
p = QgsPolygon()
210210
p.setExteriorRing(linestring)
211211
return [QgsGeometry(p)]
212212
elif QgsWkbTypes.geometryType(geom.wkbType()) == QgsWkbTypes.LineGeometry:
213213
if QgsWkbTypes.isMultiType(geom):
214214
parts = []
215215
for i in range(geom.constGet().numGeometries()):
216-
p = QgsPolygonV2()
216+
p = QgsPolygon()
217217
linestring = geom.constGet().geometryN(i).clone()
218218
linestring.close()
219219
p.setExteriorRing(linestring)
220220
parts.append(QgsGeometry(p))
221221
return QgsGeometry.collectGeometry(parts)
222222
else:
223223
# linestring to polygon
224-
p = QgsPolygonV2()
224+
p = QgsPolygon()
225225
linestring = geom.constGet().clone()
226226
linestring.close()
227227
p.setExteriorRing(linestring)

python/plugins/processing/algs/qgis/LinesToPolygons.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def getSurfaces(self, geometry):
123123
else:
124124
# not collection
125125
if geometry.vertexCount() > 2:
126-
surface = QgsPolygonV2()
126+
surface = QgsPolygon()
127127
surface.setExteriorRing(geometry.clone())
128128
surfaces.append(surface)
129129

0 commit comments

Comments
 (0)