16 #ifndef QGSGEOMETRYENGINE_H
17 #define QGSGEOMETRYENGINE_H
19 #include "qgis_core.h"
79 NothingHappened = 1000,
95 virtual void geometryChanged() = 0;
106 virtual void prepareGeometry() = 0;
185 virtual double distance(
const QgsAbstractGeometry *geom, QString *errorMsg =
nullptr )
const = 0;
192 virtual bool distanceWithin(
const QgsAbstractGeometry *geom,
double maxdistance, QString *errorMsg =
nullptr )
const = 0;
199 virtual bool intersects(
const QgsAbstractGeometry *geom, QString *errorMsg =
nullptr )
const = 0;
206 virtual bool touches(
const QgsAbstractGeometry *geom, QString *errorMsg =
nullptr )
const = 0;
213 virtual bool crosses(
const QgsAbstractGeometry *geom, QString *errorMsg =
nullptr )
const = 0;
220 virtual bool within(
const QgsAbstractGeometry *geom, QString *errorMsg =
nullptr )
const = 0;
227 virtual bool overlaps(
const QgsAbstractGeometry *geom, QString *errorMsg =
nullptr )
const = 0;
234 virtual bool contains(
const QgsAbstractGeometry *geom, QString *errorMsg =
nullptr )
const = 0;
241 virtual bool disjoint(
const QgsAbstractGeometry *geom, QString *errorMsg =
nullptr )
const = 0;
251 virtual QString relate(
const QgsAbstractGeometry *geom, QString *errorMsg =
nullptr )
const = 0;
262 virtual bool relatePattern(
const QgsAbstractGeometry *geom,
const QString &pattern, QString *errorMsg =
nullptr )
const = 0;
264 virtual double area( QString *errorMsg =
nullptr )
const = 0;
265 virtual double length( QString *errorMsg =
nullptr )
const = 0;
278 virtual bool isValid( QString *errorMsg =
nullptr,
bool allowSelfTouchingHoles =
false,
QgsGeometry *errorLoc =
nullptr )
const = 0;
286 virtual bool isEqual(
const QgsAbstractGeometry *geom, QString *errorMsg =
nullptr )
const = 0;
287 virtual bool isEmpty( QString *errorMsg )
const = 0;
293 virtual bool isSimple( QString *errorMsg =
nullptr )
const = 0;
307 QVector<QgsGeometry > &newGeometries
SIP_OUT,
309 QgsPointSequence &topologyTestPoints, QString *errorMsg =
nullptr,
bool skipIntersectionCheck =
false )
const
311 Q_UNUSED( splitLine )
312 Q_UNUSED( newGeometries )
313 Q_UNUSED( topological )
314 Q_UNUSED( topologyTestPoints )
316 Q_UNUSED( skipIntersectionCheck )
317 return MethodNotImplemented;
337 bool mLogErrors =
true;
346 void logError(
const QString &engineName,
const QString &message )
const
350 QgsDebugMsg( QStringLiteral(
"%1 notice: %2" ).arg( engineName, message ) );
351 qWarning(
"%s exception: %s", engineName.toLocal8Bit().constData(), message.toLocal8Bit().constData() );
356 : mGeometry( geometry )
360 #endif // QGSGEOMETRYENGINE_H