2017-04-27 07:55:22 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/geometry/qgsgeometryengine.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-15 15:41:56 +02:00
|
|
|
class QgsGeometryEngine
|
|
|
|
{
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
Contains geometry relation and modification algorithms.
|
|
|
|
.. versionadded:: 2.10
|
2015-05-15 15:41:56 +02:00
|
|
|
%End
|
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsgeometryengine.h"
|
|
|
|
%End
|
2015-05-15 15:41:56 +02:00
|
|
|
public:
|
|
|
|
virtual ~QgsGeometryEngine();
|
|
|
|
|
|
|
|
virtual void geometryChanged() = 0;
|
|
|
|
virtual void prepareGeometry() = 0;
|
|
|
|
|
2017-08-13 15:54:35 +02:00
|
|
|
virtual QgsAbstractGeometry *intersection( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0 /Factory/;
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: QgsAbstractGeometry
|
|
|
|
%End
|
2017-08-13 15:54:35 +02:00
|
|
|
virtual QgsAbstractGeometry *difference( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0 /Factory/;
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: QgsAbstractGeometry
|
|
|
|
%End
|
2017-08-13 15:54:35 +02:00
|
|
|
virtual QgsAbstractGeometry *combine( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0 /Factory/;
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: QgsAbstractGeometry
|
|
|
|
%End
|
|
|
|
virtual QgsAbstractGeometry *combine( const QList< QgsAbstractGeometry * > &, QString *errorMsg = 0 ) const = 0 /Factory/;
|
|
|
|
%Docstring
|
|
|
|
:rtype: QgsAbstractGeometry
|
|
|
|
%End
|
2017-08-13 15:54:35 +02:00
|
|
|
virtual QgsAbstractGeometry *symDifference( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0 /Factory/;
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: QgsAbstractGeometry
|
|
|
|
%End
|
|
|
|
virtual QgsAbstractGeometry *buffer( double distance, int segments, QString *errorMsg = 0 ) const = 0 /Factory/;
|
|
|
|
%Docstring
|
|
|
|
:rtype: QgsAbstractGeometry
|
|
|
|
%End
|
2017-08-07 18:08:57 +10:00
|
|
|
virtual QgsAbstractGeometry *buffer( double distance, int segments, int endCapStyle, int joinStyle, double miterLimit, QString *errorMsg = 0 ) const = 0 /Factory/;
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: QgsAbstractGeometry
|
|
|
|
%End
|
|
|
|
virtual QgsAbstractGeometry *simplify( double tolerance, QString *errorMsg = 0 ) const = 0 /Factory/;
|
|
|
|
%Docstring
|
|
|
|
:rtype: QgsAbstractGeometry
|
|
|
|
%End
|
|
|
|
virtual QgsAbstractGeometry *interpolate( double distance, QString *errorMsg = 0 ) const = 0 /Factory/;
|
|
|
|
%Docstring
|
|
|
|
:rtype: QgsAbstractGeometry
|
|
|
|
%End
|
|
|
|
virtual QgsAbstractGeometry *envelope( QString *errorMsg = 0 ) const = 0 /Factory/;
|
|
|
|
%Docstring
|
|
|
|
:rtype: QgsAbstractGeometry
|
|
|
|
%End
|
2017-06-01 12:18:43 +02:00
|
|
|
virtual bool centroid( QgsPoint &pt, QString *errorMsg = 0 ) const = 0;
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2017-06-01 12:18:43 +02:00
|
|
|
virtual bool pointOnSurface( QgsPoint &pt, QString *errorMsg = 0 ) const = 0;
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
|
|
|
virtual QgsAbstractGeometry *convexHull( QString *errorMsg = 0 ) const = 0 /Factory/;
|
|
|
|
%Docstring
|
|
|
|
:rtype: QgsAbstractGeometry
|
|
|
|
%End
|
2017-08-13 15:54:35 +02:00
|
|
|
virtual double distance( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0;
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: float
|
|
|
|
%End
|
2017-08-13 15:54:35 +02:00
|
|
|
virtual bool intersects( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0;
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2017-08-13 15:54:35 +02:00
|
|
|
virtual bool touches( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0;
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2017-08-13 15:54:35 +02:00
|
|
|
virtual bool crosses( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0;
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2017-08-13 15:54:35 +02:00
|
|
|
virtual bool within( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0;
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2017-08-13 15:54:35 +02:00
|
|
|
virtual bool overlaps( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0;
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2017-08-13 15:54:35 +02:00
|
|
|
virtual bool contains( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0;
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2017-08-13 15:54:35 +02:00
|
|
|
virtual bool disjoint( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0;
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
|
|
|
|
2017-08-13 15:54:35 +02:00
|
|
|
virtual QString relate( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0;
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the Dimensional Extended 9 Intersection Model (DE-9IM) representation of the
|
|
|
|
relationship between the geometries.
|
|
|
|
\param geom geometry to relate to
|
|
|
|
\param errorMsg destination storage for any error message
|
|
|
|
:return: DE-9IM string for relationship, or an empty string if an error occurred
|
|
|
|
.. versionadded:: 2.12
|
|
|
|
:rtype: str
|
|
|
|
%End
|
|
|
|
|
2017-08-13 15:54:35 +02:00
|
|
|
virtual bool relatePattern( const QgsAbstractGeometry *geom, const QString &pattern, QString *errorMsg = 0 ) const = 0;
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
Tests whether two geometries are related by a specified Dimensional Extended 9 Intersection Model (DE-9IM)
|
|
|
|
pattern.
|
|
|
|
\param geom geometry to relate to
|
|
|
|
\param pattern DE-9IM pattern for match
|
|
|
|
\param errorMsg destination storage for any error message
|
|
|
|
:return: true if geometry relationship matches with pattern
|
|
|
|
.. versionadded:: 2.14
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
|
|
|
|
|
|
|
virtual double area( QString *errorMsg = 0 ) const = 0;
|
|
|
|
%Docstring
|
|
|
|
:rtype: float
|
|
|
|
%End
|
|
|
|
virtual double length( QString *errorMsg = 0 ) const = 0;
|
|
|
|
%Docstring
|
|
|
|
:rtype: float
|
|
|
|
%End
|
|
|
|
virtual bool isValid( QString *errorMsg = 0 ) const = 0;
|
|
|
|
%Docstring
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2017-08-13 15:54:35 +02:00
|
|
|
virtual bool isEqual( const QgsAbstractGeometry *geom, QString *errorMsg = 0 ) const = 0;
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
|
|
|
virtual bool isEmpty( QString *errorMsg ) const = 0;
|
|
|
|
%Docstring
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
|
|
|
|
2017-05-17 21:48:52 +08:00
|
|
|
virtual bool isSimple( QString *errorMsg = 0 ) const = 0;
|
|
|
|
%Docstring
|
|
|
|
Determines whether the geometry is simple (according to OGC definition).
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
virtual int splitGeometry( const QgsLineString &splitLine,
|
|
|
|
QList<QgsAbstractGeometry *> &newGeometries,
|
2016-01-04 22:51:18 +11:00
|
|
|
bool topological,
|
2017-04-27 07:55:22 +02:00
|
|
|
QgsPointSequence &topologyTestPoints, QString *errorMsg = 0 ) const;
|
|
|
|
%Docstring
|
|
|
|
:rtype: int
|
|
|
|
%End
|
|
|
|
|
2017-08-07 18:08:57 +10:00
|
|
|
virtual QgsAbstractGeometry *offsetCurve( double distance, int segments, int joinStyle, double miterLimit, QString *errorMsg = 0 ) const = 0 /Factory/;
|
2017-04-27 07:55:22 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: QgsAbstractGeometry
|
|
|
|
%End
|
2016-01-04 22:51:18 +11:00
|
|
|
|
2017-04-27 07:55:22 +02:00
|
|
|
protected:
|
|
|
|
|
|
|
|
QgsGeometryEngine( const QgsAbstractGeometry *geometry );
|
2015-05-15 15:41:56 +02:00
|
|
|
};
|
2017-04-27 07:55:22 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/geometry/qgsgeometryengine.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|