QGIS API Documentation 3.39.0-Master (699c004a5df)
|
Convenience functions for geometry editing. More...
#include <qgsgeometryeditutils.h>
Static Public Member Functions | |
static Qgis::GeometryOperationResult | addPart (QgsAbstractGeometry *geometry, std::unique_ptr< QgsAbstractGeometry > part) |
Add a part to multi type geometry. | |
static Qgis::GeometryOperationResult | addRing (QgsAbstractGeometry *geometry, std::unique_ptr< QgsCurve > ring) |
Add an interior ring to a geometry. | |
static std::unique_ptr< QgsAbstractGeometry > | avoidIntersections (const QgsAbstractGeometry &geom, const QList< QgsVectorLayer * > &avoidIntersectionsLayers, bool &haveInvalidGeometry, const QHash< QgsVectorLayer *, QSet< QgsFeatureId > > &ignoreFeatures=(QHash< QgsVectorLayer *, QSet< QgsFeatureId > >())) |
Alters a geometry so that it avoids intersections with features from all open vector layers. | |
static bool | deletePart (QgsAbstractGeometry *geom, int partNum) |
Deletes a part from a geometry. | |
static bool | deleteRing (QgsAbstractGeometry *geom, int ringNum, int partNum=0) |
Deletes a ring from a geometry. | |
Convenience functions for geometry editing.
Definition at line 37 of file qgsgeometryeditutils.h.
|
static |
Add a part to multi type geometry.
Ownership of the part is transferred.
Definition at line 96 of file qgsgeometryeditutils.cpp.
|
static |
Add an interior ring to a geometry.
Ownership of the ring is transferred.
Definition at line 27 of file qgsgeometryeditutils.cpp.
|
static |
Alters a geometry so that it avoids intersections with features from all open vector layers.
geom | geometry to alter |
avoidIntersectionsLayers | list of layers to check for intersections |
haveInvalidGeometry | returns true if at least one geometry intersected is invalid. In this case, the algorithm may not work and return the same geometry as the input. You must fix your intersecting geometries. |
ignoreFeatures | map of layer to feature id of features to ignore |
Definition at line 278 of file qgsgeometryeditutils.cpp.
|
static |
Deletes a part from a geometry.
true
if delete was successful Definition at line 262 of file qgsgeometryeditutils.cpp.
|
static |
Deletes a ring from a geometry.
true
if delete was successful Definition at line 229 of file qgsgeometryeditutils.cpp.