QGIS API Documentation  2.7.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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)
 
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:80
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 45 of file qgsgeometry.cpp.

#define DEFAULT_QUADRANT_SEGMENTS   8

Definition at line 43 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 6092 of file qgsgeometry.cpp.

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

Definition at line 230 of file qgsgeometry.cpp.

static GEOSCoordSequence* createGeosCoordSequence ( const QgsPolyline points)
static

Definition at line 206 of file qgsgeometry.cpp.

static GEOSGeometry* createGeosLinearRing ( const QgsPolyline polyline)
static

Definition at line 274 of file qgsgeometry.cpp.

static GEOSGeometry* createGeosLineString ( const QgsPolyline polyline)
static

Definition at line 255 of file qgsgeometry.cpp.

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

Definition at line 193 of file qgsgeometry.cpp.

static GEOSGeometry* createGeosPoint ( const QgsPoint point)
static

Definition at line 201 of file qgsgeometry.cpp.

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

Definition at line 312 of file qgsgeometry.cpp.

static GEOSGeometry* createGeosPolygon ( GEOSGeometry *  shell)
static

Definition at line 352 of file qgsgeometry.cpp.

static GEOSGeometry* createGeosPolygon ( const QgsPolygon polygon)
static

Definition at line 357 of file qgsgeometry.cpp.

static QgsGeometry* fromGeosGeom ( GEOSGeometry *  geom)
static

Definition at line 392 of file qgsgeometry.cpp.

static unsigned int getNumGeosPoints ( const GEOSGeometry *  geom)
static

Definition at line 185 of file qgsgeometry.cpp.

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

Definition at line 106 of file qgsgeometry.cpp.

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

Definition at line 92 of file qgsgeometry.cpp.

Variable Documentation

GEOSInit geosinit
static

Definition at line 138 of file qgsgeometry.cpp.