#include <limits>
#include <cstdarg>
#include <cstdio>
#include <cmath>
#include "qgis.h"
#include "qgsgeometry.h"
#include "qgsapplication.h"
#include "qgslogger.h"
#include "qgspoint.h"
#include "qgsrectangle.h"
#include "qgsmaplayerregistry.h"
#include "qgsvectorlayer.h"
#include "qgsproject.h"
Go to the source code of this file.
Classes | |
class | GEOSException |
class | GEOSInit |
Defines | |
#define | DEFAULT_QUADRANT_SEGMENTS 8 |
#define | CATCH_GEOS(r) |
Functions | |
static void | throwGEOSException (const char *fmt,...) |
static void | printGEOSNotice (const char *fmt,...) |
static unsigned int | getNumGeosPoints (const GEOSGeometry *geom) |
static GEOSGeometry * | createGeosPoint (const QgsPoint &point) |
static GEOSCoordSequence * | createGeosCoordSequence (const QgsPolyline &points) |
static GEOSGeometry * | createGeosCollection (int typeId, QVector< GEOSGeometry * > geoms) |
static GEOSGeometry * | createGeosLineString (const QgsPolyline &polyline) |
static GEOSGeometry * | createGeosLinearRing (const QgsPolyline &polyline) |
static GEOSGeometry * | createGeosPolygon (const QVector< GEOSGeometry * > &rings) |
static GEOSGeometry * | createGeosPolygon (GEOSGeometry *shell) |
static GEOSGeometry * | createGeosPolygon (const QgsPolygon &polygon) |
static QgsGeometry * | fromGeosGeom (GEOSGeometry *geom) |
static double | distLine2Point (QgsPoint p, QgsVector v, QgsPoint q) |
static bool | intersectLines (QgsPoint p, QgsVector v, QgsPoint q, QgsVector w, QgsPoint &s) |
bool | pointInRing (const QgsPolyline &ring, const QgsPoint &p) |
static bool | ringInRing (const QgsPolyline &inside, const QgsPolyline &outside) |
Variables | |
static GEOSInit | geosinit |
#define CATCH_GEOS | ( | r | ) |
Value:
catch (GEOSException &e) \ { \ Q_UNUSED(e); \ QgsDebugMsg("GEOS: " + QString( e.what() ) ); \ return r; \ }
Definition at line 36 of file qgsgeometry.cpp.
Referenced by QgsGeometry::area(), QgsGeometry::buffer(), QgsGeometry::centroid(), QgsGeometry::combine(), QgsGeometry::convexHull(), QgsGeometry::difference(), QgsGeometry::distance(), QgsGeometry::exportWkbToGeos(), QgsGeometry::geosRelOp(), QgsGeometry::intersection(), QgsGeometry::intersects(), QgsGeometry::length(), QgsGeometry::makeDifference(), QgsGeometry::simplify(), QgsGeometry::splitGeometry(), and QgsGeometry::symDifference().
#define DEFAULT_QUADRANT_SEGMENTS 8 |
static GEOSGeometry* createGeosCollection | ( | int | typeId, | |
QVector< GEOSGeometry * > | geoms | |||
) | [static] |
Definition at line 269 of file qgsgeometry.cpp.
Referenced by QgsGeometry::addIsland(), QgsGeometry::addRing(), QgsGeometry::exportWkbToGeos(), QgsGeometry::fromMultiPoint(), QgsGeometry::fromMultiPolygon(), QgsGeometry::fromMultiPolyline(), and QgsGeometry::mergeGeometriesMultiTypeSplit().
static GEOSCoordSequence* createGeosCoordSequence | ( | const QgsPolyline & | points | ) | [static] |
Definition at line 245 of file qgsgeometry.cpp.
Referenced by createGeosLinearRing(), and createGeosLineString().
static GEOSGeometry* createGeosLinearRing | ( | const QgsPolyline & | polyline | ) | [static] |
Definition at line 313 of file qgsgeometry.cpp.
References createGeosCoordSequence().
Referenced by QgsGeometry::addIsland(), QgsGeometry::addRing(), createGeosPolygon(), and QgsGeometry::exportWkbToGeos().
static GEOSGeometry* createGeosLineString | ( | const QgsPolyline & | polyline | ) | [static] |
Definition at line 294 of file qgsgeometry.cpp.
References createGeosCoordSequence().
Referenced by QgsGeometry::exportWkbToGeos(), QgsGeometry::fromMultiPolyline(), QgsGeometry::fromPolyline(), QgsGeometry::reshapeGeometry(), and QgsGeometry::splitGeometry().
static GEOSGeometry* createGeosPoint | ( | const QgsPoint & | point | ) | [static] |
Definition at line 237 of file qgsgeometry.cpp.
References QgsPoint::x(), and QgsPoint::y().
Referenced by QgsGeometry::contains(), QgsGeometry::exportWkbToGeos(), QgsGeometry::fromMultiPoint(), QgsGeometry::fromPoint(), and QgsGeometry::reshapeLine().
static GEOSGeometry* createGeosPolygon | ( | const QgsPolygon & | polygon | ) | [static] |
Definition at line 374 of file qgsgeometry.cpp.
References createGeosLinearRing(), and createGeosPolygon().
static GEOSGeometry* createGeosPolygon | ( | GEOSGeometry * | shell | ) | [static] |
static GEOSGeometry* createGeosPolygon | ( | const QVector< GEOSGeometry * > & | rings | ) | [static] |
Definition at line 346 of file qgsgeometry.cpp.
Referenced by QgsGeometry::addIsland(), QgsGeometry::addRing(), createGeosPolygon(), QgsGeometry::exportWkbToGeos(), QgsGeometry::fromMultiPolygon(), and QgsGeometry::fromPolygon().
Definition at line 6314 of file qgsgeometry.cpp.
References QgsVector::length(), QgsPoint::x(), QgsVector::x(), QgsVector::y(), and QgsPoint::y().
Referenced by QgsGeometry::checkRingIntersections(), and QgsGeometry::validatePolyline().
static QgsGeometry* fromGeosGeom | ( | GEOSGeometry * | geom | ) | [static] |
Definition at line 397 of file qgsgeometry.cpp.
References QgsGeometry::fromGeos().
Referenced by QgsGeometry::asGeometryCollection(), QgsGeometry::buffer(), QgsGeometry::centroid(), QgsGeometry::combine(), QgsGeometry::convexHull(), QgsGeometry::difference(), QgsGeometry::fromMultiPoint(), QgsGeometry::fromMultiPolygon(), QgsGeometry::fromMultiPolyline(), QgsGeometry::fromPoint(), QgsGeometry::fromPolygon(), QgsGeometry::fromPolyline(), QgsGeometry::fromWkt(), QgsGeometry::intersection(), QgsGeometry::simplify(), QgsGeometry::splitLinearGeometry(), QgsGeometry::splitPolygonGeometry(), and QgsGeometry::symDifference().
static unsigned int getNumGeosPoints | ( | const GEOSGeometry * | geom | ) | [static] |
static bool intersectLines | ( | QgsPoint | p, | |
QgsVector | v, | |||
QgsPoint | q, | |||
QgsVector | w, | |||
QgsPoint & | s | |||
) | [static] |
Definition at line 6324 of file qgsgeometry.cpp.
References QgsPoint::x(), QgsVector::x(), QgsPoint::y(), and QgsVector::y().
Referenced by QgsGeometry::checkRingIntersections(), and QgsGeometry::validatePolyline().
bool pointInRing | ( | const QgsPolyline & | ring, | |
const QgsPoint & | p | |||
) |
Definition at line 6340 of file qgsgeometry.cpp.
References QgsPoint::x(), and QgsPoint::y().
Referenced by ringInRing().
static void printGEOSNotice | ( | const char * | fmt, | |
... | ||||
) | [static] |
Definition at line 98 of file qgsgeometry.cpp.
References QgsDebugMsg.
Referenced by GEOSInit::GEOSInit().
static bool ringInRing | ( | const QgsPolyline & | inside, | |
const QgsPolyline & | outside | |||
) | [static] |
Definition at line 6363 of file qgsgeometry.cpp.
References pointInRing().
Referenced by QgsGeometry::validateGeometry(), and QgsGeometry::validatePolygon().
static void throwGEOSException | ( | const char * | fmt, | |
... | ||||
) | [static] |
Definition at line 84 of file qgsgeometry.cpp.
References QgsDebugMsg.
Referenced by QgsGeometry::addRing(), and GEOSInit::GEOSInit().
Definition at line 126 of file qgsgeometry.cpp.