QGIS API Documentation
3.10.0-A Coruña (6c816b4204)
|
Contains geometry relation and modification algorithms. More...
#include <qgsgeometryengine.h>
Public Types | |
enum | EngineOperationResult { Success = 0, NothingHappened = 1000, MethodNotImplemented, EngineError, NodedGeometryError, InvalidBaseGeometry, InvalidInput, SplitCannotSplitPoint } |
Success or failure of a geometry operation. More... | |
Public Member Functions | |
virtual | ~QgsGeometryEngine ()=default |
virtual double | area (QString *errorMsg=nullptr) const =0 |
virtual QgsAbstractGeometry * | buffer (double distance, int segments, QString *errorMsg=nullptr) const =0 |
virtual QgsAbstractGeometry * | buffer (double distance, int segments, int endCapStyle, int joinStyle, double miterLimit, QString *errorMsg=nullptr) const =0 |
virtual QgsPoint * | centroid (QString *errorMsg=nullptr) const =0 |
Calculates the centroid of this. More... | |
virtual QgsAbstractGeometry * | combine (const QgsAbstractGeometry *geom, QString *errorMsg=nullptr) const =0 |
Calculate the combination of this and geom. More... | |
virtual QgsAbstractGeometry * | combine (const QVector< QgsAbstractGeometry *> &geomList, QString *errorMsg) const =0 |
Calculate the combination of this and geometries. More... | |
virtual QgsAbstractGeometry * | combine (const QVector< QgsGeometry > &geometries, QString *errorMsg=nullptr) const =0 |
Calculate the combination of this and geometries. More... | |
virtual bool | contains (const QgsAbstractGeometry *geom, QString *errorMsg=nullptr) const =0 |
Checks if geom contains this. More... | |
virtual QgsAbstractGeometry * | convexHull (QString *errorMsg=nullptr) const =0 |
Calculate the convex hull of this. More... | |
virtual bool | crosses (const QgsAbstractGeometry *geom, QString *errorMsg=nullptr) const =0 |
Checks if geom crosses this. More... | |
virtual QgsAbstractGeometry * | difference (const QgsAbstractGeometry *geom, QString *errorMsg=nullptr) const =0 |
Calculate the difference of this and geom. More... | |
virtual bool | disjoint (const QgsAbstractGeometry *geom, QString *errorMsg=nullptr) const =0 |
Checks if geom is disjoint from this. More... | |
virtual double | distance (const QgsAbstractGeometry *geom, QString *errorMsg=nullptr) const =0 |
Calculates the distance between this and geom. More... | |
virtual QgsAbstractGeometry * | envelope (QString *errorMsg=nullptr) const =0 |
virtual void | geometryChanged ()=0 |
Should be called whenever the geometry associated with the engine has been modified and the engine must be updated to suit. More... | |
virtual QgsAbstractGeometry * | interpolate (double distance, QString *errorMsg=nullptr) const =0 |
virtual QgsAbstractGeometry * | intersection (const QgsAbstractGeometry *geom, QString *errorMsg=nullptr) const =0 |
Calculate the intersection of this and geom. More... | |
virtual bool | intersects (const QgsAbstractGeometry *geom, QString *errorMsg=nullptr) const =0 |
Checks if geom intersects this. More... | |
virtual bool | isEmpty (QString *errorMsg) const =0 |
virtual bool | isEqual (const QgsAbstractGeometry *geom, QString *errorMsg=nullptr) const =0 |
Checks if this is equal to geom. More... | |
virtual bool | isSimple (QString *errorMsg=nullptr) const =0 |
Determines whether the geometry is simple (according to OGC definition). More... | |
virtual bool | isValid (QString *errorMsg=nullptr, bool allowSelfTouchingHoles=false, QgsGeometry *errorLoc=nullptr) const =0 |
Returns true if the geometry is valid. More... | |
virtual double | length (QString *errorMsg=nullptr) const =0 |
virtual QgsAbstractGeometry * | offsetCurve (double distance, int segments, int joinStyle, double miterLimit, QString *errorMsg=nullptr) const =0 |
virtual bool | overlaps (const QgsAbstractGeometry *geom, QString *errorMsg=nullptr) const =0 |
Checks if geom overlaps this. More... | |
virtual QgsPoint * | pointOnSurface (QString *errorMsg=nullptr) const =0 |
Calculate a point that is guaranteed to be on the surface of this. More... | |
virtual void | prepareGeometry ()=0 |
Prepares the geometry, so that subsequent calls to spatial relation methods are much faster. More... | |
virtual QString | relate (const QgsAbstractGeometry *geom, QString *errorMsg=nullptr) const =0 |
Returns the Dimensional Extended 9 Intersection Model (DE-9IM) representation of the relationship between the geometries. More... | |
virtual bool | relatePattern (const QgsAbstractGeometry *geom, const QString &pattern, QString *errorMsg=nullptr) const =0 |
Tests whether two geometries are related by a specified Dimensional Extended 9 Intersection Model (DE-9IM) pattern. More... | |
virtual QgsAbstractGeometry * | simplify (double tolerance, QString *errorMsg=nullptr) const =0 |
virtual QgsGeometryEngine::EngineOperationResult | splitGeometry (const QgsLineString &splitLine, QVector< QgsGeometry > &newGeometries, bool topological, QgsPointSequence &topologyTestPoints, QString *errorMsg=nullptr) const |
Splits this geometry according to a given line. More... | |
virtual QgsAbstractGeometry * | symDifference (const QgsAbstractGeometry *geom, QString *errorMsg=nullptr) const =0 |
Calculate the symmetric difference of this and geom. More... | |
virtual bool | touches (const QgsAbstractGeometry *geom, QString *errorMsg=nullptr) const =0 |
Checks if geom touches this. More... | |
virtual bool | within (const QgsAbstractGeometry *geom, QString *errorMsg=nullptr) const =0 |
Checks if geom is within this. More... | |
Protected Member Functions | |
QgsGeometryEngine (const QgsAbstractGeometry *geometry) | |
Protected Attributes | |
const QgsAbstractGeometry * | mGeometry = nullptr |
Contains geometry relation and modification algorithms.
Definition at line 33 of file qgsgeometryengine.h.
Success or failure of a geometry operation.
This gives details about cause of failure.
Definition at line 41 of file qgsgeometryengine.h.
|
virtualdefault |
|
inlineprotected |
Definition at line 276 of file qgsgeometryengine.h.
|
pure virtual |
Implemented in QgsGeos.
|
pure virtual |
Implemented in QgsGeos.
|
pure virtual |
Implemented in QgsGeos.
|
pure virtual |
Calculates the centroid of this.
May return a \c nullptr
.
Implemented in QgsGeos.
|
pure virtual |
|
pure virtual |
Calculate the combination of this and geometries.
Implemented in QgsGeos.
|
pure virtual |
Calculate the combination of this and geometries.
Implemented in QgsGeos.
|
pure virtual |
|
pure virtual |
Calculate the convex hull of this.
Implemented in QgsGeos.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Calculates the distance between this and geom.
Implemented in QgsGeos.
|
pure virtual |
Implemented in QgsGeos.
|
pure virtual |
Should be called whenever the geometry associated with the engine has been modified and the engine must be updated to suit.
Implemented in QgsGeos.
|
pure virtual |
Implemented in QgsGeos.
|
pure virtual |
Calculate the intersection of this and geom.
Implemented in QgsGeos.
|
pure virtual |
|
pure virtual |
Implemented in QgsGeos.
|
pure virtual |
Checks if this is equal to geom.
If both are Null geometries, \c false
is returned.
Implemented in QgsGeos.
|
pure virtual |
Determines whether the geometry is simple (according to OGC definition).
Implemented in QgsGeos.
|
pure virtual |
Returns true if the geometry is valid.
If the geometry is invalid, errorMsg will be filled with the reported geometry error.
The allowSelfTouchingHoles argument specifies whether self-touching holes are permitted. OGC validity states that self-touching holes are NOT permitted, whilst other vendor validity checks (e.g. ESRI) permit self-touching holes.
If errorLoc is specified, it will be set to the geometry of the error location.
Implemented in QgsGeos.
|
pure virtual |
Implemented in QgsGeos.
|
pure virtual |
Implemented in QgsGeos.
|
pure virtual |
|
pure virtual |
Calculate a point that is guaranteed to be on the surface of this.
May return a \c nullptr
.
Implemented in QgsGeos.
|
pure virtual |
Prepares the geometry, so that subsequent calls to spatial relation methods are much faster.
This should be called for any geometry which is used for multiple relation tests against other geometries.
Implemented in QgsGeos.
|
pure virtual |
Returns the Dimensional Extended 9 Intersection Model (DE-9IM) representation of the relationship between the geometries.
geom | geometry to relate to |
errorMsg | destination storage for any error message |
Implemented in QgsGeos.
|
pure virtual |
Tests whether two geometries are related by a specified Dimensional Extended 9 Intersection Model (DE-9IM) pattern.
geom | geometry to relate to |
pattern | DE-9IM pattern for match |
errorMsg | destination storage for any error message |
true
if geometry relationship matches with pattern Implemented in QgsGeos.
|
pure virtual |
Implemented in QgsGeos.
|
inlinevirtual |
Splits this geometry according to a given line.
splitLine | the line that splits the geometry | |
[out] | newGeometries | list of new geometries that have been created with the split |
topological | true if topological editing is enabled | |
[out] | topologyTestPoints | points that need to be tested for topological completeness in the dataset |
[out] | errorMsg | error messages emitted, if any |
Reimplemented in QgsGeos.
Definition at line 258 of file qgsgeometryengine.h.
|
pure virtual |
Calculate the symmetric difference of this and geom.
Implemented in QgsGeos.
|
pure virtual |
|
pure virtual |
|
protected |
Definition at line 274 of file qgsgeometryengine.h.