Skip to content

Commit 9a57bae

Browse files
committedOct 30, 2017
Rename QgsMultiPolygon to QgsMultiPolygonXY
1 parent b790874 commit 9a57bae

20 files changed

+65
-65
lines changed
 

‎python/core/geometry/qgsgeometry.sip

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ typedef QVector<QgsPointXY> QgsMultiPointXY;
2525

2626
typedef QVector<QVector<QgsPointXY>> QgsMultiPolylineXY;
2727

28-
typedef QVector<QVector<QVector<QgsPointXY>>> QgsMultiPolygon;
28+
typedef QVector<QVector<QVector<QgsPointXY>>> QgsMultiPolygonXY;
2929

3030

3131

@@ -194,7 +194,7 @@ Creates a new geometry from a QgsMultiPolylineXY object
194194
Creates a new geometry from a QgsPolygon
195195
:rtype: QgsGeometry
196196
%End
197-
static QgsGeometry fromMultiPolygon( const QgsMultiPolygon &multipoly );
197+
static QgsGeometry fromMultiPolygon( const QgsMultiPolygonXY &multipoly );
198198
%Docstring
199199
Creates a new geometry from a QgsMultiPolygon
200200
:rtype: QgsGeometry
@@ -1165,11 +1165,11 @@ Returns an extruded version of this geometry.
11651165
:rtype: QgsMultiPolylineXY
11661166
%End
11671167

1168-
QgsMultiPolygon asMultiPolygon() const;
1168+
QgsMultiPolygonXY asMultiPolygon() const;
11691169
%Docstring
11701170
Returns contents of the geometry as a multi polygon
11711171
if wkbType is WKBMultiPolygon, otherwise an empty list
1172-
:rtype: QgsMultiPolygon
1172+
:rtype: QgsMultiPolygonXY
11731173
%End
11741174

11751175
QList<QgsGeometry> asGeometryCollection() const;
@@ -1534,10 +1534,10 @@ Returns an extruded version of this geometry.
15341534
sipCanConvertToType( a0, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, SIP_NOT_NONE ) &&
15351535
sipCanConvertToType( a1, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, SIP_NOT_NONE ) )
15361536
{
1537-
QgsMultiPolygon *p0;
1538-
QgsMultiPolygon *p1;
1539-
p0 = reinterpret_cast<QgsMultiPolygon *>( sipConvertToType( a0, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, 0, SIP_NOT_NONE, &state0, &sipIsErr ) );
1540-
p1 = reinterpret_cast<QgsMultiPolygon *>( sipConvertToType( a1, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, 0, SIP_NOT_NONE, &state1, &sipIsErr ) );
1537+
QgsMultiPolygonXY *p0;
1538+
QgsMultiPolygonXY *p1;
1539+
p0 = reinterpret_cast<QgsMultiPolygonXY *>( sipConvertToType( a0, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, 0, SIP_NOT_NONE, &state0, &sipIsErr ) );
1540+
p1 = reinterpret_cast<QgsMultiPolygonXY *>( sipConvertToType( a1, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, 0, SIP_NOT_NONE, &state1, &sipIsErr ) );
15411541
if ( sipIsErr )
15421542
{
15431543
sipReleaseType( p0, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, state0 );

‎src/app/qgsmaptooldeletepart.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ QgsGeometry QgsMapToolDeletePart::partUnderPoint( QPoint point, QgsFeatureId &fi
175175
fid = f.id();
176176
return geomPart;
177177
}
178-
QgsMultiPolygon mpolygon = g.asMultiPolygon();
178+
QgsMultiPolygonXY mpolygon = g.asMultiPolygon();
179179
for ( int part = 0; part < mpolygon.count(); part++ ) // go through the polygons
180180
{
181181
const QgsPolygonXY &polygon = mpolygon[part];

‎src/app/qgsmaptooldeletering.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ QgsGeometry QgsMapToolDeleteRing::ringUnderPoint( const QgsPointXY &p, QgsFeatur
126126
QgsFeature f;
127127
QgsGeometry g;
128128
QgsGeometry ringGeom;
129-
QgsMultiPolygon pol;
129+
QgsMultiPolygonXY pol;
130130
QgsPolygonXYtempPol;
131131
QgsGeometry tempGeom;
132132
double area = std::numeric_limits<double>::max();
@@ -137,7 +137,7 @@ QgsGeometry QgsMapToolDeleteRing::ringUnderPoint( const QgsPointXY &p, QgsFeatur
137137
continue;
138138
if ( g.wkbType() == QgsWkbTypes::Polygon || g.wkbType() == QgsWkbTypes::Polygon25D )
139139
{
140-
pol = QgsMultiPolygon() << g.asPolygon();
140+
pol = QgsMultiPolygonXY() << g.asPolygon();
141141
}
142142
else
143143
{
@@ -215,7 +215,7 @@ int QgsMapToolDeleteRing::ringNumInPolygon( const QgsGeometry &g, int vertexNr )
215215

216216
int QgsMapToolDeleteRing::ringNumInMultiPolygon( const QgsGeometry &g, int vertexNr, int &partNum )
217217
{
218-
QgsMultiPolygon mpolygon = g.asMultiPolygon();
218+
QgsMultiPolygonXY mpolygon = g.asMultiPolygon();
219219
for ( int part = 0; part < mpolygon.count(); part++ )
220220
{
221221
const QgsPolygonXY &polygon = mpolygon[part];

‎src/app/qgsmaptoolfillring.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,10 @@ QgsGeometry QgsMapToolFillRing::ringUnderPoint( const QgsPointXY &p, QgsFeatureI
199199
if ( g.isNull() )
200200
continue;
201201

202-
QgsMultiPolygon pol;
202+
QgsMultiPolygonXY pol;
203203
if ( g.wkbType() == QgsWkbTypes::Polygon || g.wkbType() == QgsWkbTypes::Polygon25D )
204204
{
205-
pol = QgsMultiPolygon() << g.asPolygon();
205+
pol = QgsMultiPolygonXY() << g.asPolygon();
206206
}
207207
else
208208
{

‎src/app/qgsmaptooloffsetcurve.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ QgsGeometry QgsMapToolOffsetCurve::linestringFromPolygon( const QgsGeometry &fea
408408

409409
QgsWkbTypes::Type geomType = featureGeom.wkbType();
410410
int currentVertex = 0;
411-
QgsMultiPolygon multiPoly;
411+
QgsMultiPolygonXY multiPoly;
412412

413413
if ( geomType == QgsWkbTypes::Polygon || geomType == QgsWkbTypes::Polygon25D )
414414
{
@@ -425,7 +425,7 @@ QgsGeometry QgsMapToolOffsetCurve::linestringFromPolygon( const QgsGeometry &fea
425425
return QgsGeometry();
426426
}
427427

428-
QgsMultiPolygon::const_iterator multiPolyIt = multiPoly.constBegin();
428+
QgsMultiPolygonXY::const_iterator multiPolyIt = multiPoly.constBegin();
429429
for ( ; multiPolyIt != multiPoly.constEnd(); ++multiPolyIt )
430430
{
431431
QgsPolygonXY::const_iterator polyIt = multiPolyIt->constBegin();

‎src/core/geometry/qgsgeometry.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ QgsGeometry QgsGeometry::fromMultiPolyline( const QgsMultiPolylineXY &multiline
211211
return QgsGeometry();
212212
}
213213

214-
QgsGeometry QgsGeometry::fromMultiPolygon( const QgsMultiPolygon &multipoly )
214+
QgsGeometry QgsGeometry::fromMultiPolygon( const QgsMultiPolygonXY &multipoly )
215215
{
216216
std::unique_ptr< QgsMultiPolygonV2 > geom = QgsGeometryFactory::fromMultiPolygon( multipoly );
217217
if ( geom )
@@ -1438,26 +1438,26 @@ QgsMultiPolylineXY QgsGeometry::asMultiPolyline() const
14381438
return mpl;
14391439
}
14401440

1441-
QgsMultiPolygon QgsGeometry::asMultiPolygon() const
1441+
QgsMultiPolygonXY QgsGeometry::asMultiPolygon() const
14421442
{
14431443
if ( !d->geometry )
14441444
{
1445-
return QgsMultiPolygon();
1445+
return QgsMultiPolygonXY();
14461446
}
14471447

14481448
QgsGeometryCollection *geomCollection = qgsgeometry_cast<QgsGeometryCollection *>( d->geometry.get() );
14491449
if ( !geomCollection )
14501450
{
1451-
return QgsMultiPolygon();
1451+
return QgsMultiPolygonXY();
14521452
}
14531453

14541454
int nPolygons = geomCollection->numGeometries();
14551455
if ( nPolygons < 1 )
14561456
{
1457-
return QgsMultiPolygon();
1457+
return QgsMultiPolygonXY();
14581458
}
14591459

1460-
QgsMultiPolygon mp;
1460+
QgsMultiPolygonXY mp;
14611461
for ( int i = 0; i < nPolygons; ++i )
14621462
{
14631463
const QgsPolygonV2 *polygon = qgsgeometry_cast<const QgsPolygonV2 *>( geomCollection->geometryN( i ) );
@@ -2601,7 +2601,7 @@ bool QgsGeometry::compare( const QgsPolygonXY &p1, const QgsPolygonXY &p2, doubl
26012601
}
26022602

26032603

2604-
bool QgsGeometry::compare( const QgsMultiPolygon &p1, const QgsMultiPolygon &p2, double epsilon )
2604+
bool QgsGeometry::compare( const QgsMultiPolygonXY &p1, const QgsMultiPolygonXY &p2, double epsilon )
26052605
{
26062606
if ( p1.count() != p2.count() )
26072607
return false;
@@ -2854,7 +2854,7 @@ QgsGeometry QgsGeometry::convertToPoint( bool destMultipart ) const
28542854
// input geometry is multipart: make a multipoint from multipolygon
28552855
if ( isMultipart() )
28562856
{
2857-
const QgsMultiPolygon multiPolygon = asMultiPolygon();
2857+
const QgsMultiPolygonXY multiPolygon = asMultiPolygon();
28582858
QgsMultiPointXY multiPoint;
28592859
for ( const QgsPolygonXY &poly : multiPolygon )
28602860
for ( const QgsPolylineXY &line : poly )
@@ -2930,7 +2930,7 @@ QgsGeometry QgsGeometry::convertToLine( bool destMultipart ) const
29302930
// input geometry is multipolygon
29312931
if ( isMultipart() )
29322932
{
2933-
const QgsMultiPolygon multiPolygon = asMultiPolygon();
2933+
const QgsMultiPolygonXY multiPolygon = asMultiPolygon();
29342934
QgsMultiPolylineXY multiLine;
29352935
for ( const QgsPolygonXY &poly : multiPolygon )
29362936
for ( const QgsPolylineXY &line : poly )
@@ -3004,7 +3004,7 @@ QgsGeometry QgsGeometry::convertToPolygon( bool destMultipart ) const
30043004

30053005
QgsPolygonXY polygon = QgsPolygonXY() << multiPoint;
30063006
if ( destMultipart )
3007-
return fromMultiPolygon( QgsMultiPolygon() << polygon );
3007+
return fromMultiPolygon( QgsMultiPolygonXY() << polygon );
30083008
else
30093009
return fromPolygon( polygon );
30103010
}
@@ -3015,7 +3015,7 @@ QgsGeometry QgsGeometry::convertToPolygon( bool destMultipart ) const
30153015
if ( isMultipart() )
30163016
{
30173017
QgsMultiPolylineXY multiLine = asMultiPolyline();
3018-
QgsMultiPolygon multiPolygon;
3018+
QgsMultiPolygonXY multiPolygon;
30193019
for ( QgsMultiPolylineXY::iterator multiLineIt = multiLine.begin(); multiLineIt != multiLine.end(); ++multiLineIt )
30203020
{
30213021
// do not create polygon for a 1 segment line
@@ -3061,7 +3061,7 @@ QgsGeometry QgsGeometry::convertToPolygon( bool destMultipart ) const
30613061
// destination is multipart
30623062
if ( destMultipart )
30633063
{
3064-
return fromMultiPolygon( QgsMultiPolygon() << ( QgsPolygonXY() << line ) );
3064+
return fromMultiPolygon( QgsMultiPolygonXY() << ( QgsPolygonXY() << line ) );
30653065
}
30663066
else
30673067
{
@@ -3086,11 +3086,11 @@ QgsGeometry QgsGeometry::convertToPolygon( bool destMultipart ) const
30863086
// destination is multipart => makes a multipoint with a single polygon
30873087
QgsPolygonXY polygon = asPolygon();
30883088
if ( !polygon.isEmpty() )
3089-
return fromMultiPolygon( QgsMultiPolygon() << polygon );
3089+
return fromMultiPolygon( QgsMultiPolygonXY() << polygon );
30903090
}
30913091
else
30923092
{
3093-
QgsMultiPolygon multiPolygon = asMultiPolygon();
3093+
QgsMultiPolygonXY multiPolygon = asMultiPolygon();
30943094
if ( multiPolygon.count() == 1 )
30953095
{
30963096
// destination is singlepart => make a single part if possible

‎src/core/geometry/qgsgeometry.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ typedef QVector<QVector<QgsPointXY>> QgsMultiPolylineXY;
8787

8888
//! A collection of QgsPolygons that share a common collection of attributes
8989
#ifndef SIP_RUN
90-
typedef QVector<QgsPolygonXY> QgsMultiPolygon;
90+
typedef QVector<QgsPolygonXY> QgsMultiPolygonXY;
9191
#else
92-
typedef QVector<QVector<QVector<QgsPointXY>>> QgsMultiPolygon;
92+
typedef QVector<QVector<QVector<QgsPointXY>>> QgsMultiPolygonXY;
9393
#endif
9494

9595
class QgsRectangle;
@@ -246,7 +246,7 @@ class CORE_EXPORT QgsGeometry
246246
//! Creates a new geometry from a QgsPolygon
247247
static QgsGeometry fromPolygon( const QgsPolygonXY &polygon );
248248
//! Creates a new geometry from a QgsMultiPolygon
249-
static QgsGeometry fromMultiPolygon( const QgsMultiPolygon &multipoly );
249+
static QgsGeometry fromMultiPolygon( const QgsMultiPolygonXY &multipoly );
250250
//! Creates a new geometry from a QgsRectangle
251251
static QgsGeometry fromRect( const QgsRectangle &rect );
252252
//! Creates a new multipart geometry from a list of QgsGeometry objects
@@ -1170,7 +1170,7 @@ class CORE_EXPORT QgsGeometry
11701170
* Returns contents of the geometry as a multi polygon
11711171
* if wkbType is WKBMultiPolygon, otherwise an empty list
11721172
*/
1173-
QgsMultiPolygon asMultiPolygon() const;
1173+
QgsMultiPolygonXY asMultiPolygon() const;
11741174

11751175
/**
11761176
* Return contents of the geometry as a list of geometries
@@ -1463,7 +1463,7 @@ class CORE_EXPORT QgsGeometry
14631463
* tolerance
14641464
* \since QGIS 2.9
14651465
*/
1466-
static bool compare( const QgsMultiPolygon &p1, const QgsMultiPolygon &p2,
1466+
static bool compare( const QgsMultiPolygonXY &p1, const QgsMultiPolygonXY &p2,
14671467
double epsilon = 4 * std::numeric_limits<double>::epsilon() );
14681468
#else
14691469

@@ -1560,10 +1560,10 @@ class CORE_EXPORT QgsGeometry
15601560
sipCanConvertToType( a0, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, SIP_NOT_NONE ) &&
15611561
sipCanConvertToType( a1, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, SIP_NOT_NONE ) )
15621562
{
1563-
QgsMultiPolygon *p0;
1564-
QgsMultiPolygon *p1;
1565-
p0 = reinterpret_cast<QgsMultiPolygon *>( sipConvertToType( a0, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, 0, SIP_NOT_NONE, &state0, &sipIsErr ) );
1566-
p1 = reinterpret_cast<QgsMultiPolygon *>( sipConvertToType( a1, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, 0, SIP_NOT_NONE, &state1, &sipIsErr ) );
1563+
QgsMultiPolygonXY *p0;
1564+
QgsMultiPolygonXY *p1;
1565+
p0 = reinterpret_cast<QgsMultiPolygonXY *>( sipConvertToType( a0, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, 0, SIP_NOT_NONE, &state0, &sipIsErr ) );
1566+
p1 = reinterpret_cast<QgsMultiPolygonXY *>( sipConvertToType( a1, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, 0, SIP_NOT_NONE, &state1, &sipIsErr ) );
15671567
if ( sipIsErr )
15681568
{
15691569
sipReleaseType( p0, sipType_QVector_0600QVector_0600QVector_0100QgsPointXY, state0 );

‎src/core/geometry/qgsgeometryfactory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ std::unique_ptr<QgsPolygonV2> QgsGeometryFactory::fromPolygon( const QgsPolygonX
187187
return poly;
188188
}
189189

190-
std::unique_ptr< QgsMultiPolygonV2 > QgsGeometryFactory::fromMultiPolygon( const QgsMultiPolygon &multipoly )
190+
std::unique_ptr< QgsMultiPolygonV2 > QgsGeometryFactory::fromMultiPolygon( const QgsMultiPolygonXY &multipoly )
191191
{
192192
std::unique_ptr< QgsMultiPolygonV2 > mp = qgis::make_unique< QgsMultiPolygonV2 >();
193193
for ( int i = 0; i < multipoly.size(); ++i )

‎src/core/geometry/qgsgeometryfactory.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ typedef QVector<QgsPointXY> QgsPolylineXY;
4040
typedef QVector<QgsPolylineXY> QgsPolygonXY;
4141
typedef QVector<QgsPointXY> QgsMultiPointXY;
4242
typedef QVector<QgsPolylineXY> QgsMultiPolylineXY;
43-
typedef QVector<QgsPolygonXY> QgsMultiPolygon;
43+
typedef QVector<QgsPolygonXY> QgsMultiPolygonXY;
4444

4545
/**
4646
* \ingroup core
@@ -75,7 +75,7 @@ class CORE_EXPORT QgsGeometryFactory
7575
//! Construct geometry from a polygon
7676
static std::unique_ptr<QgsPolygonV2> fromPolygon( const QgsPolygonXY &polygon );
7777
//! Construct geometry from a multipolygon
78-
static std::unique_ptr<QgsMultiPolygonV2> fromMultiPolygon( const QgsMultiPolygon &multipoly );
78+
static std::unique_ptr<QgsMultiPolygonV2> fromMultiPolygon( const QgsMultiPolygonXY &multipoly );
7979
//! Return empty geometry from wkb type
8080
static std::unique_ptr< QgsAbstractGeometry > geomFromWkbType( QgsWkbTypes::Type t );
8181

‎src/core/qgsgeometryvalidator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ void QgsGeometryValidator::run()
282282
}
283283
else if ( flatType == QgsWkbTypes::MultiPolygon )
284284
{
285-
QgsMultiPolygon mp = mGeometry.asMultiPolygon();
285+
QgsMultiPolygonXY mp = mGeometry.asMultiPolygon();
286286
for ( int i = 0; !mStop && i < mp.size(); i++ )
287287
{
288288
validatePolygon( i, mp[i] );

‎src/core/qgsogcutils.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiLineString( const QDomElement &geom
633633
QgsGeometry QgsOgcUtils::geometryFromGMLMultiPolygon( const QDomElement &geometryElement )
634634
{
635635
//first list: different polygons, second list: different rings, third list: different points
636-
QgsMultiPolygon multiPolygonPoints;
636+
QgsMultiPolygonXY multiPolygonPoints;
637637
QDomElement currentPolygonMemberElement;
638638
QDomNodeList polygonList;
639639
QDomElement currentPolygonElement;
@@ -777,7 +777,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiPolygon( const QDomElement &geometr
777777

778778
int size = 1 + 2 * sizeof( int );
779779
//calculate the wkb size
780-
for ( QgsMultiPolygon::const_iterator it = multiPolygonPoints.constBegin(); it != multiPolygonPoints.constEnd(); ++it )
780+
for ( QgsMultiPolygonXY::const_iterator it = multiPolygonPoints.constBegin(); it != multiPolygonPoints.constEnd(); ++it )
781781
{
782782
size += 1 + 2 * sizeof( int );
783783
for ( QgsPolygonXY::const_iterator iter = it->begin(); iter != it->end(); ++iter )
@@ -805,7 +805,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiPolygon( const QDomElement &geometr
805805

806806
type = QgsWkbTypes::Polygon;
807807

808-
for ( QgsMultiPolygon::const_iterator it = multiPolygonPoints.constBegin(); it != multiPolygonPoints.constEnd(); ++it )
808+
for ( QgsMultiPolygonXY::const_iterator it = multiPolygonPoints.constBegin(); it != multiPolygonPoints.constEnd(); ++it )
809809
{
810810
memcpy( &( wkb )[wkbPosition], &e, 1 );
811811
wkbPosition += 1;

‎src/core/qgsvectorlayereditutils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ int QgsVectorLayerEditUtils::addTopologicalPoints( const QgsGeometry &geom )
578578
case QgsWkbTypes::MultiPolygon25D:
579579
case QgsWkbTypes::MultiPolygon:
580580
{
581-
QgsMultiPolygon multiPolygon = geom.asMultiPolygon();
581+
QgsMultiPolygonXY multiPolygon = geom.asMultiPolygon();
582582
QgsPolygonXY currentPolygon;
583583
QgsPolylineXY currentRing;
584584

‎src/core/symbology/qgsinvertedpolygonrenderer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ void QgsInvertedPolygonRenderer::stopRender( QgsRenderContext &context )
252252
return;
253253
}
254254

255-
QgsMultiPolygon finalMulti; //avoid expensive allocation for list for every feature
255+
QgsMultiPolygonXY finalMulti; //avoid expensive allocation for list for every feature
256256
QgsPolygonXY newPoly;
257257

258258
Q_FOREACH ( const CombinedFeature &cit, mFeaturesCategories )
@@ -284,7 +284,7 @@ void QgsInvertedPolygonRenderer::stopRender( QgsRenderContext &context )
284284
finalMulti.append( mExtentPolygon );
285285
Q_FOREACH ( const QgsGeometry &geom, cit.geometries )
286286
{
287-
QgsMultiPolygon multi;
287+
QgsMultiPolygonXY multi;
288288
QgsWkbTypes::Type type = QgsWkbTypes::flatType( geom.constGet()->wkbType() );
289289

290290
if ( ( type == QgsWkbTypes::Polygon ) || ( type == QgsWkbTypes::CurvePolygon ) )

‎src/core/symbology/qgssymbollayerutils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ QList<QPolygonF> offsetLine( QPolygonF polyline, double dist, QgsWkbTypes::Geome
803803
}
804804
else if ( QgsWkbTypes::flatType( tempGeometry.wkbType() ) == QgsWkbTypes::MultiPolygon )
805805
{
806-
QgsMultiPolygon tempMPolygon = tempGeometry.asMultiPolygon();
806+
QgsMultiPolygonXY tempMPolygon = tempGeometry.asMultiPolygon();
807807
resultLine.reserve( tempMPolygon.count() );
808808
for ( int part = 0; part < tempMPolygon.count(); ++part )
809809
{

‎src/gui/qgshighlight.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ void QgsHighlight::paint( QPainter *p )
311311
}
312312
else
313313
{
314-
QgsMultiPolygon m = mGeometry->asMultiPolygon();
314+
QgsMultiPolygonXY m = mGeometry->asMultiPolygon();
315315
for ( int i = 0; i < m.size(); i++ )
316316
{
317317
paintPolygon( p, m[i] );

‎src/gui/qgsrubberband.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ void QgsRubberBand::addGeometry( const QgsGeometry &geometry, const QgsCoordinat
334334
case QgsWkbTypes::MultiPolygon25D:
335335
{
336336

337-
const QgsMultiPolygon multipoly = geom.asMultiPolygon();
337+
const QgsMultiPolygonXY multipoly = geom.asMultiPolygon();
338338
for ( const QgsPolygonXY &poly : multipoly )
339339
{
340340
if ( poly.empty() )

0 commit comments

Comments
 (0)
Please sign in to comment.