QGIS API Documentation  2.9.0-Master
Classes | Macros | Functions | Variables
qgsgeometry.cpp File Reference
#include <limits>
#include <cstdarg>
#include <cstdio>
#include <cmath>
#include "qgis.h"
#include "qgsgeometry.h"
#include "qgsapplication.h"
#include "qgslogger.h"
#include "qgsmessagelog.h"
#include "qgspoint.h"
#include "qgsrectangle.h"
#include "qgsmaplayerregistry.h"
#include "qgsvectorlayer.h"
#include "qgsproject.h"
#include "qgsgeometryvalidator.h"
#include <QDebug>
#include <netinet/in.h>
Include dependency graph for qgsgeometry.cpp:

Go to the source code of this file.

Classes

class  GEOSException
 
class  GEOSInit
 

Macros

#define CATCH_GEOS(r)
 
#define DEFAULT_QUADRANT_SEGMENTS   8
 

Functions

static GEOSGeometry * _makeUnion (QList< GEOSGeometry * > geoms)
 Return union of several geometries - try to use unary union if available (GEOS >= 3.3) otherwise use a cascade of unions. More...
 
static GEOSGeometry * createGeosCollection (int typeId, QVector< GEOSGeometry * > geoms)
 
static GEOSCoordSequence * createGeosCoordSequence (const QgsPolyline &points)
 
static GEOSGeometry * createGeosLinearRing (const QgsPolyline &polyline)
 
static GEOSGeometry * createGeosLineString (const QgsPolyline &polyline)
 
static GEOSGeometry * createGeosPoint (const double x, const double y)
 
static GEOSGeometry * createGeosPoint (const QgsPoint &point)
 
static GEOSGeometry * createGeosPolygon (const QVector< GEOSGeometry * > &rings)
 
static GEOSGeometry * createGeosPolygon (GEOSGeometry *shell)
 
static GEOSGeometry * createGeosPolygon (const QgsPolygon &polygon)
 
static QgsGeometryfromGeosGeom (GEOSGeometry *geom)
 
static unsigned int getNumGeosPoints (const GEOSGeometry *geom)
 
QgsPoint interpolatePointOnLine (const QgsPoint &p1, const QgsPoint &p2, const double offset)
 
QDataStream & operator<< (QDataStream &out, const QgsGeometry &geometry)
 Writes the geometry to stream out. More...
 
QDataStream & operator>> (QDataStream &in, QgsGeometry &geometry)
 Reads a geometry from stream in into geometry. More...
 
static void printGEOSNotice (const char *fmt,...)
 
static void throwGEOSException (const char *fmt,...)
 

Variables

static GEOSInit geosinit
 

Macro Definition Documentation

#define CATCH_GEOS (   r)
Value:
catch (GEOSException &e) \
{ \
QgsMessageLog::logMessage( QObject::tr( "Exception: %1" ).arg( e.what() ), QObject::tr("GEOS") ); \
return r; \
}
QString what()
Definition: qgsgeometry.cpp:79
static void logMessage(QString message, QString tag=QString::null, MessageLevel level=WARNING)
add a message to the instance (and create it if necessary)
#define tr(sourceText)

Definition at line 44 of file qgsgeometry.cpp.

#define DEFAULT_QUADRANT_SEGMENTS   8

Definition at line 42 of file qgsgeometry.cpp.

Function Documentation

static GEOSGeometry* _makeUnion ( QList< GEOSGeometry * >  geoms)
static

Return union of several geometries - try to use unary union if available (GEOS >= 3.3) otherwise use a cascade of unions.

Takes ownership of passed geometries, returns a new instance

Definition at line 6256 of file qgsgeometry.cpp.

static GEOSGeometry* createGeosCollection ( int  typeId,
QVector< GEOSGeometry * >  geoms 
)
static

Definition at line 229 of file qgsgeometry.cpp.

static GEOSCoordSequence* createGeosCoordSequence ( const QgsPolyline points)
static

Definition at line 205 of file qgsgeometry.cpp.

static GEOSGeometry* createGeosLinearRing ( const QgsPolyline polyline)
static

Definition at line 273 of file qgsgeometry.cpp.

static GEOSGeometry* createGeosLineString ( const QgsPolyline polyline)
static

Definition at line 254 of file qgsgeometry.cpp.

static GEOSGeometry* createGeosPoint ( const double  x,
const double  y 
)
static

Definition at line 192 of file qgsgeometry.cpp.

static GEOSGeometry* createGeosPoint ( const QgsPoint point)
static

Definition at line 200 of file qgsgeometry.cpp.

static GEOSGeometry* createGeosPolygon ( const QVector< GEOSGeometry * > &  rings)
static

Definition at line 311 of file qgsgeometry.cpp.

static GEOSGeometry* createGeosPolygon ( GEOSGeometry *  shell)
static

Definition at line 351 of file qgsgeometry.cpp.

static GEOSGeometry* createGeosPolygon ( const QgsPolygon polygon)
static

Definition at line 356 of file qgsgeometry.cpp.

static QgsGeometry* fromGeosGeom ( GEOSGeometry *  geom)
static

Definition at line 391 of file qgsgeometry.cpp.

static unsigned int getNumGeosPoints ( const GEOSGeometry *  geom)
static

Definition at line 184 of file qgsgeometry.cpp.

QgsPoint interpolatePointOnLine ( const QgsPoint p1,
const QgsPoint p2,
const double  offset 
)
inline

Definition at line 5857 of file qgsgeometry.cpp.

QDataStream& operator<< ( QDataStream &  out,
const QgsGeometry geometry 
)

Writes the geometry to stream out.

QGIS version compatibility is not guaranteed.

Definition at line 6785 of file qgsgeometry.cpp.

QDataStream& operator>> ( QDataStream &  in,
QgsGeometry geometry 
)

Reads a geometry from stream in into geometry.

QGIS version compatibility is not guaranteed.

Definition at line 6792 of file qgsgeometry.cpp.

static void printGEOSNotice ( const char *  fmt,
  ... 
)
static

Definition at line 105 of file qgsgeometry.cpp.

static void throwGEOSException ( const char *  fmt,
  ... 
)
static

Definition at line 91 of file qgsgeometry.cpp.

Variable Documentation

GEOSInit geosinit
static

Definition at line 137 of file qgsgeometry.cpp.