@@ -321,11 +321,13 @@ class CORE_EXPORT QgsGeometry
321
321
/* * Adds a new ring to this geometry. This makes only sense for polygon and multipolygons.
322
322
@return 0 in case of success (ring added), 1 problem with geometry type, 2 ring not closed,
323
323
3 ring is not valid geometry, 4 ring not disjoint with existing rings, 5 no polygon found which contained the ring*/
324
+ // TODO QGIS 3.0 returns an enum instead of a magic constant
324
325
int addRing ( const QList<QgsPoint>& ring );
325
326
326
327
/* * Adds a new ring to this geometry. This makes only sense for polygon and multipolygons.
327
328
@return 0 in case of success (ring added), 1 problem with geometry type, 2 ring not closed,
328
329
3 ring is not valid geometry, 4 ring not disjoint with existing rings, 5 no polygon found which contained the ring*/
330
+ // TODO QGIS 3.0 returns an enum instead of a magic constant
329
331
int addRing ( QgsCurveV2* ring );
330
332
331
333
/* * Adds a new part to a the geometry.
@@ -334,6 +336,7 @@ class CORE_EXPORT QgsGeometry
334
336
* @returns 0 in case of success, 1 if not a multipolygon, 2 if ring is not a valid geometry, 3 if new polygon ring
335
337
* not disjoint with existing polygons of the feature
336
338
*/
339
+ // TODO QGIS 3.0 returns an enum instead of a magic constant
337
340
int addPart ( const QList<QgsPoint> &points, QGis::GeometryType geomType = QGis::UnknownGeometry );
338
341
339
342
/* * Adds a new part to a the geometry.
@@ -342,6 +345,7 @@ class CORE_EXPORT QgsGeometry
342
345
* @returns 0 in case of success, 1 if not a multipolygon, 2 if ring is not a valid geometry, 3 if new polygon ring
343
346
* not disjoint with existing polygons of the feature
344
347
*/
348
+ // TODO QGIS 3.0 returns an enum instead of a magic constant
345
349
int addPart ( const QList<QgsPointV2> &points, QGis::GeometryType geomType = QGis::UnknownGeometry );
346
350
347
351
/* * Adds a new part to this geometry.
@@ -350,6 +354,7 @@ class CORE_EXPORT QgsGeometry
350
354
* @returns 0 in case of success, 1 if not a multipolygon, 2 if ring is not a valid geometry, 3 if new polygon ring
351
355
* not disjoint with existing polygons of the feature
352
356
*/
357
+ // TODO QGIS 3.0 returns an enum instead of a magic constant
353
358
int addPart ( QgsAbstractGeometryV2* part, QGis::GeometryType geomType = QGis::UnknownGeometry );
354
359
355
360
/* * Adds a new island polygon to a multipolygon feature
@@ -358,13 +363,15 @@ class CORE_EXPORT QgsGeometry
358
363
* not disjoint with existing polygons of the feature
359
364
* @note not available in python bindings
360
365
*/
366
+ // TODO QGIS 3.0 returns an enum instead of a magic constant
361
367
int addPart ( GEOSGeometry *newPart );
362
368
363
369
/* * Adds a new island polygon to a multipolygon feature
364
370
@return 0 in case of success, 1 if not a multipolygon, 2 if ring is not a valid geometry, 3 if new polygon ring
365
371
not disjoint with existing polygons of the feature
366
372
@note available in python bindings as addPartGeometry (added in 2.2)
367
373
*/
374
+ // TODO QGIS 3.0 returns an enum instead of a magic constant
368
375
int addPart ( const QgsGeometry *newPart );
369
376
370
377
/* * Translate this geometry by dx, dy
@@ -393,6 +400,7 @@ class CORE_EXPORT QgsGeometry
393
400
@param topological true if topological editing is enabled
394
401
@param[out] topologyTestPoints points that need to be tested for topological completeness in the dataset
395
402
@return 0 in case of success, 1 if geometry has not been split, error else*/
403
+ // TODO QGIS 3.0 returns an enum instead of a magic constant
396
404
int splitGeometry ( const QList<QgsPoint>& splitLine,
397
405
QList<QgsGeometry*>&newGeometries,
398
406
bool topological,
0 commit comments