Convenience functions for geometry editing.
More...
#include <qgsgeometryeditutils.h>
|
static Qgis::GeometryOperationResult | addPart (QgsAbstractGeometry *geometry, std::unique_ptr< QgsAbstractGeometry > part) |
| Add a part to multi type geometry. More...
|
|
static Qgis::GeometryOperationResult | 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.
- Note
- not available in Python bindings
- Since
- QGIS 2.10
Definition at line 38 of file qgsgeometryeditutils.h.
◆ addPart()
Add a part to multi type geometry.
Ownership of the part is transferred.
- Returns
- 0 in case of success, 1 if not a multigeometry, 2 if part is not a valid geometry, 3 if new polygon ring not disjoint with existing polygons of the feature
Definition at line 98 of file qgsgeometryeditutils.cpp.
◆ addRing()
Add an interior ring to a geometry.
Ownership of the ring is transferred.
- Returns
- 0 in case of success (ring added), 1 problem with geometry type, 2 ring not closed, 3 ring is not valid geometry, 4 ring not disjoint with existing rings, 5 no polygon found which contained the ring
Definition at line 29 of file qgsgeometryeditutils.cpp.
◆ avoidIntersections()
Alters a geometry so that it avoids intersections with features from all open vector layers.
- Parameters
-
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 280 of file qgsgeometryeditutils.cpp.
◆ deletePart()
◆ deleteRing()
bool QgsGeometryEditUtils::deleteRing |
( |
QgsAbstractGeometry * |
geom, |
|
|
int |
ringNum, |
|
|
int |
partNum = 0 |
|
) |
| |
|
static |
The documentation for this class was generated from the following files: