16 #ifndef QGSGEOMETRYENGINE_H 17 #define QGSGEOMETRYENGINE_H 19 #include "qgis_core.h" 44 NothingHappened = 1000,
60 virtual void geometryChanged() = 0;
71 virtual void prepareGeometry() = 0;
115 virtual QgsAbstractGeometry *buffer(
double distance,
int segments,
int endCapStyle,
int joinStyle,
double miterLimit, QString *errorMsg =
nullptr )
const = 0
SIP_FACTORY;
146 virtual double distance(
const QgsAbstractGeometry *geom, QString *errorMsg =
nullptr )
const = 0;
153 virtual bool intersects(
const QgsAbstractGeometry *geom, QString *errorMsg =
nullptr )
const = 0;
160 virtual bool touches(
const QgsAbstractGeometry *geom, QString *errorMsg =
nullptr )
const = 0;
167 virtual bool crosses(
const QgsAbstractGeometry *geom, QString *errorMsg =
nullptr )
const = 0;
174 virtual bool within(
const QgsAbstractGeometry *geom, QString *errorMsg =
nullptr )
const = 0;
181 virtual bool overlaps(
const QgsAbstractGeometry *geom, QString *errorMsg =
nullptr )
const = 0;
188 virtual bool contains(
const QgsAbstractGeometry *geom, QString *errorMsg =
nullptr )
const = 0;
195 virtual bool disjoint(
const QgsAbstractGeometry *geom, QString *errorMsg =
nullptr )
const = 0;
205 virtual QString relate(
const QgsAbstractGeometry *geom, QString *errorMsg =
nullptr )
const = 0;
216 virtual bool relatePattern(
const QgsAbstractGeometry *geom,
const QString &pattern, QString *errorMsg =
nullptr )
const = 0;
218 virtual double area( QString *errorMsg =
nullptr )
const = 0;
219 virtual double length( QString *errorMsg =
nullptr )
const = 0;
232 virtual bool isValid( QString *errorMsg =
nullptr,
bool allowSelfTouchingHoles =
false,
QgsGeometry *errorLoc =
nullptr )
const = 0;
240 virtual bool isEqual(
const QgsAbstractGeometry *geom, QString *errorMsg =
nullptr )
const = 0;
241 virtual bool isEmpty( QString *errorMsg )
const = 0;
247 virtual bool isSimple( QString *errorMsg =
nullptr )
const = 0;
259 QVector<QgsGeometry > &newGeometries
SIP_OUT,
263 Q_UNUSED( splitLine );
264 Q_UNUSED( newGeometries );
265 Q_UNUSED( topological );
266 Q_UNUSED( topologyTestPoints );
267 Q_UNUSED( errorMsg );
268 return MethodNotImplemented;
271 virtual QgsAbstractGeometry *offsetCurve(
double distance,
int segments,
int joinStyle,
double miterLimit, QString *errorMsg =
nullptr )
const = 0
SIP_FACTORY;
277 : mGeometry( geometry )
281 #endif // QGSGEOMETRYENGINE_H 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.
A geometry is the spatial representation of a feature.
Method not implemented in geometry engine.
Abstract base class for all geometries.
Point geometry type, with support for z-dimension and m-values.
Error occurred while creating a noded geometry.
Error occurred in the geometry engine.
QVector< QgsPoint > QgsPointSequence
QgsGeometryEngine(const QgsAbstractGeometry *geometry)
Line string geometry type, with support for z-dimension and m-values.
Contains geometry relation and modification algorithms.
EngineOperationResult
Success or failure of a geometry operation.
The geometry on which the operation occurs is not valid.