QGIS API Documentation
3.20.0-Odense (decaadbb31)
|
Convenience functions for geometry editing. More...
#include <qgsgeometryeditutils.h>
Static Public Member Functions | |
static QgsGeometry::OperationResult | addPart (QgsAbstractGeometry *geometry, std::unique_ptr< QgsAbstractGeometry > part) |
Add a part to multi type geometry. More... | |
static QgsGeometry::OperationResult | addRing (QgsAbstractGeometry *geometry, std::unique_ptr< QgsCurve > ring) |
Add an interior ring to a geometry. More... | |
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. More... | |
static bool | deletePart (QgsAbstractGeometry *geom, int partNum) |
Deletes a part from a geometry. More... | |
static bool | deleteRing (QgsAbstractGeometry *geom, int ringNum, int partNum=0) |
Deletes a ring from a geometry. More... | |
Convenience functions for geometry editing.
Definition at line 38 of file qgsgeometryeditutils.h.
|
static |
Add a part to multi type geometry.
Ownership of the part is transferred.
Definition at line 98 of file qgsgeometryeditutils.cpp.
|
static |
Add an interior ring to a geometry.
Ownership of the ring is transferred.
Definition at line 29 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 225 of file qgsgeometryeditutils.cpp.
|
static |
Deletes a part from a geometry.
true
if delete was successful Definition at line 209 of file qgsgeometryeditutils.cpp.
|
static |
Deletes a ring from a geometry.
true
if delete was successful Definition at line 176 of file qgsgeometryeditutils.cpp.