QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
|
Does vector analysis using the geos library and handles import, export, exception handling*. More...
#include <qgsgeos.h>
Public Member Functions | |
QgsGeos (const QgsAbstractGeometryV2 *geometry, double precision=0) | |
GEOS geometry engine constructor. More... | |
~QgsGeos () | |
double | area (QString *errorMsg=nullptr) const override |
QgsAbstractGeometryV2 * | buffer (double distance, int segments, QString *errorMsg=nullptr) const override |
QgsAbstractGeometryV2 * | buffer (double distance, int segments, int endCapStyle, int joinStyle, double mitreLimit, QString *errorMsg=nullptr) const override |
bool | centroid (QgsPointV2 &pt, QString *errorMsg=nullptr) const override |
QgsGeometry | closestPoint (const QgsGeometry &other, QString *errorMsg=nullptr) const |
Returns the closest point on the geometry to the other geometry. More... | |
QgsAbstractGeometryV2 * | combine (const QgsAbstractGeometryV2 &geom, QString *errorMsg=nullptr) const override |
QgsAbstractGeometryV2 * | combine (const QList< QgsAbstractGeometryV2 *> &, QString *errorMsg=nullptr) const override |
bool | contains (const QgsAbstractGeometryV2 &geom, QString *errorMsg=nullptr) const override |
QgsAbstractGeometryV2 * | convexHull (QString *errorMsg=nullptr) const override |
bool | crosses (const QgsAbstractGeometryV2 &geom, QString *errorMsg=nullptr) const override |
QgsAbstractGeometryV2 * | difference (const QgsAbstractGeometryV2 &geom, QString *errorMsg=nullptr) const override |
bool | disjoint (const QgsAbstractGeometryV2 &geom, QString *errorMsg=nullptr) const override |
double | distance (const QgsAbstractGeometryV2 &geom, QString *errorMsg=nullptr) const override |
QgsAbstractGeometryV2 * | envelope (QString *errorMsg=nullptr) const override |
void | geometryChanged () override |
Removes caches. More... | |
QgsAbstractGeometryV2 * | interpolate (double distance, QString *errorMsg=nullptr) const override |
QgsAbstractGeometryV2 * | intersection (const QgsAbstractGeometryV2 &geom, QString *errorMsg=nullptr) const override |
bool | intersects (const QgsAbstractGeometryV2 &geom, QString *errorMsg=nullptr) const override |
bool | isEmpty (QString *errorMsg=nullptr) const override |
bool | isEqual (const QgsAbstractGeometryV2 &geom, QString *errorMsg=nullptr) const override |
bool | isValid (QString *errorMsg=nullptr) const override |
double | length (QString *errorMsg=nullptr) const override |
double | lineLocatePoint (const QgsPointV2 &point, QString *errorMsg=nullptr) const |
Returns a distance representing the location along this linestring of the closest point on this linestring geometry to the specified point. More... | |
QgsGeometry | mergeLines (QString *errorMsg=nullptr) const |
Merges any connected lines in a LineString/MultiLineString geometry and converts them to single line strings. More... | |
QgsAbstractGeometryV2 * | offsetCurve (double distance, int segments, int joinStyle, double mitreLimit, QString *errorMsg=nullptr) const override |
bool | overlaps (const QgsAbstractGeometryV2 &geom, QString *errorMsg=nullptr) const override |
bool | pointOnSurface (QgsPointV2 &pt, QString *errorMsg=nullptr) const override |
void | prepareGeometry () override |
QString | relate (const QgsAbstractGeometryV2 &geom, QString *errorMsg=nullptr) const override |
Returns the Dimensional Extended 9 Intersection Model (DE-9IM) representation of the relationship between the geometries. More... | |
bool | relatePattern (const QgsAbstractGeometryV2 &geom, const QString &pattern, QString *errorMsg=nullptr) const override |
Tests whether two geometries are related by a specified Dimensional Extended 9 Intersection Model (DE-9IM) pattern. More... | |
QgsAbstractGeometryV2 * | reshapeGeometry (const QgsLineStringV2 &reshapeWithLine, int *errorCode, QString *errorMsg=nullptr) const |
QgsGeometry | shortestLine (const QgsGeometry &other, QString *errorMsg=nullptr) const |
Returns the shortest line joining this geometry to the other geometry. More... | |
QgsAbstractGeometryV2 * | simplify (double tolerance, QString *errorMsg=nullptr) const override |
int | splitGeometry (const QgsLineStringV2 &splitLine, QList< QgsAbstractGeometryV2 *> &newGeometries, bool topological, QgsPointSequenceV2 &topologyTestPoints, QString *errorMsg=nullptr) const override |
Splits this geometry according to a given line. More... | |
QgsAbstractGeometryV2 * | symDifference (const QgsAbstractGeometryV2 &geom, QString *errorMsg=nullptr) const override |
bool | touches (const QgsAbstractGeometryV2 &geom, QString *errorMsg=nullptr) const override |
bool | within (const QgsAbstractGeometryV2 &geom, QString *errorMsg=nullptr) const override |
Public Member Functions inherited from QgsGeometryEngine | |
QgsGeometryEngine (const QgsAbstractGeometryV2 *geometry) | |
virtual | ~QgsGeometryEngine () |
virtual QgsAbstractGeometryV2 * | combine (const QList< QgsAbstractGeometryV2 * > &, QString *errorMsg=nullptr) const =0 |
Static Public Member Functions | |
static GEOSGeometry * | asGeos (const QgsAbstractGeometryV2 *geom, double precision=0) |
static QgsPointV2 | coordSeqPoint (const GEOSCoordSequence *cs, int i, bool hasZ, bool hasM) |
static QgsAbstractGeometryV2 * | fromGeos (const GEOSGeometry *geos) |
Create a geometry from a GEOSGeometry. More... | |
static QgsPolygonV2 * | fromGeosPolygon (const GEOSGeometry *geos) |
static GEOSContextHandle_t | getGEOSHandler () |
Additional Inherited Members | |
Protected Member Functions inherited from QgsGeometryEngine | |
QgsGeometryEngine () | |
Protected Attributes inherited from QgsGeometryEngine | |
const QgsAbstractGeometryV2 * | mGeometry |
Does vector analysis using the geos library and handles import, export, exception handling*.
QgsGeos::QgsGeos | ( | const QgsAbstractGeometryV2 * | geometry, |
double | precision = 0 |
||
) |
GEOS geometry engine constructor.
geometry | The geometry |
precision | The precision of the grid to which to snap the geometry vertices. If 0, no snapping is performed. |
Definition at line 135 of file qgsgeos.cpp.
QgsGeos::~QgsGeos | ( | ) |
Definition at line 144 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 348 of file qgsgeos.cpp.
|
static |
Definition at line 1054 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 1278 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 1294 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 1346 of file qgsgeos.cpp.
QgsGeometry QgsGeos::closestPoint | ( | const QgsGeometry & | other, |
QString * | errorMsg = nullptr |
||
) | const |
Returns the closest point on the geometry to the other geometry.
Definition at line 1817 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 191 of file qgsgeos.cpp.
|
override |
Definition at line 196 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 275 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 1417 of file qgsgeos.cpp.
|
static |
Definition at line 1017 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 260 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 186 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 280 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 225 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 1373 of file qgsgeos.cpp.
|
static |
Create a geometry from a GEOSGeometry.
geos | GEOSGeometry. Ownership is NOT transferred. |
Definition at line 865 of file qgsgeos.cpp.
|
static |
Definition at line 953 of file qgsgeos.cpp.
|
overridevirtual |
|
static |
Definition at line 2416 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 1331 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 181 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 250 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 1468 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 1448 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 1434 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 365 of file qgsgeos.cpp.
double QgsGeos::lineLocatePoint | ( | const QgsPointV2 & | point, |
QString * | errorMsg = nullptr |
||
) | const |
Returns a distance representing the location along this linestring of the closest point on this linestring geometry to the specified point.
Ie, the returned value indicates how far along this linestring you need to traverse to get to the closest location where this linestring comes to the specified point.
point | point to seek proximity to |
errorMsg | error messages emitted, if any |
Definition at line 1895 of file qgsgeos.cpp.
QgsGeometry QgsGeos::mergeLines | ( | QString * | errorMsg = nullptr | ) | const |
Merges any connected lines in a LineString/MultiLineString geometry and converts them to single line strings.
errorMsg | if specified, will be set to any reported GEOS errors |
Definition at line 1798 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 1674 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 270 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 1388 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 161 of file qgsgeos.cpp.
|
overridevirtual |
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 |
Implements QgsGeometryEngine.
Definition at line 285 of file qgsgeos.cpp.
|
overridevirtual |
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 |
Implements QgsGeometryEngine.
Definition at line 319 of file qgsgeos.cpp.
QgsAbstractGeometryV2 * QgsGeos::reshapeGeometry | ( | const QgsLineStringV2 & | reshapeWithLine, |
int * | errorCode, | ||
QString * | errorMsg = nullptr |
||
) | const |
Definition at line 1690 of file qgsgeos.cpp.
QgsGeometry QgsGeos::shortestLine | ( | const QgsGeometry & | other, |
QString * | errorMsg = nullptr |
||
) | const |
Returns the shortest line joining this geometry to the other geometry.
Definition at line 1852 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 1316 of file qgsgeos.cpp.
|
overridevirtual |
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 from QgsGeometryEngine.
Definition at line 381 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 220 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 255 of file qgsgeos.cpp.
|
overridevirtual |
Implements QgsGeometryEngine.
Definition at line 265 of file qgsgeos.cpp.