File tree 4 files changed +11
-7
lines changed
4 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -230,8 +230,10 @@ not disjoint with existing polygons of the feature*/
230
230
/** Returns a geometry representing the points shared by this geometry and other. */
231
231
QgsGeometry* intersection(QgsGeometry* geometry) /Factory/;
232
232
233
- /** Returns a geometry representing all the points in this geometry and other. */
234
- QgsGeometry* Union(QgsGeometry* geometry) /Factory/;
233
+ /** Returns a geometry representing all the points in this geometry and other (a
234
+ * union geometry operation).
235
+ * @note this operation is not called union since its a reserved word in C++.*/
236
+ QgsGeometry* combine( QgsGeometry* geometry );
235
237
236
238
/** Returns a geometry representing the points making up this geometry that do not make up other. */
237
239
QgsGeometry* difference(QgsGeometry* geometry) /Factory/;
Original file line number Diff line number Diff line change @@ -5347,7 +5347,7 @@ QgsGeometry* QgsGeometry::intersection( QgsGeometry* geometry )
5347
5347
CATCH_GEOS ( 0 )
5348
5348
}
5349
5349
5350
- QgsGeometry* QgsGeometry::Union ( QgsGeometry* geometry )
5350
+ QgsGeometry* QgsGeometry::combine ( QgsGeometry* geometry )
5351
5351
{
5352
5352
if ( geometry == NULL )
5353
5353
{
Original file line number Diff line number Diff line change @@ -276,8 +276,10 @@ class CORE_EXPORT QgsGeometry
276
276
/* * Returns a geometry representing the points shared by this geometry and other. */
277
277
QgsGeometry* intersection ( QgsGeometry* geometry );
278
278
279
- /* * Returns a geometry representing all the points in this geometry and other. */
280
- QgsGeometry* Union ( QgsGeometry* geometry );
279
+ /* * Returns a geometry representing all the points in this geometry and other (a
280
+ * union geometry operation).
281
+ * @note this operation is not called union since its a reserved word in C++.*/
282
+ QgsGeometry* combine ( QgsGeometry* geometry );
281
283
282
284
/* * Returns a geometry representing the points making up this geometry that do not make up other. */
283
285
QgsGeometry* difference ( QgsGeometry* geometry );
Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ void TestQgsGeometry::intersectionCheck2()
227
227
void TestQgsGeometry::unionCheck1 ()
228
228
{
229
229
// should be a multipolygon with 2 parts as A does not intersect C
230
- QgsGeometry * mypUnionGeometry = mpPolygonGeometryA->Union ( mpPolygonGeometryC );
230
+ QgsGeometry * mypUnionGeometry = mpPolygonGeometryA->combine ( mpPolygonGeometryC );
231
231
qDebug ( " Geometry Type: " + wkbTypeAsString ( mypUnionGeometry->wkbType () ).toLocal8Bit () );
232
232
QVERIFY ( mypUnionGeometry->wkbType () == QGis::WKBMultiPolygon );
233
233
QgsMultiPolygon myMultiPolygon = mypUnionGeometry->asMultiPolygon ();
@@ -240,7 +240,7 @@ void TestQgsGeometry::unionCheck1()
240
240
void TestQgsGeometry::unionCheck2 ()
241
241
{
242
242
// should be a single polygon as A intersect B
243
- QgsGeometry * mypUnionGeometry = mpPolygonGeometryA->Union ( mpPolygonGeometryB );
243
+ QgsGeometry * mypUnionGeometry = mpPolygonGeometryA->combine ( mpPolygonGeometryB );
244
244
qDebug ( " Geometry Type: " + wkbTypeAsString ( mypUnionGeometry->wkbType () ).toLocal8Bit () );
245
245
QVERIFY ( mypUnionGeometry->wkbType () == QGis::WKBPolygon );
246
246
QgsPolygon myPolygon = mypUnionGeometry->asPolygon ();
You can’t perform that action at this time.
0 commit comments