QGIS API Documentation  2.0.1-Dufour
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
QgsGeometryValidator Class Reference

#include <qgsgeometryvalidator.h>

Collaboration diagram for QgsGeometryValidator:
Collaboration graph

Public Slots

void addError (QgsGeometry::Error)


void errorFound (QgsGeometry::Error)

Public Member Functions

 QgsGeometryValidator (QgsGeometry *g, QList< QgsGeometry::Error > *errors=0)
 ~QgsGeometryValidator ()
void run ()
void stop ()

Static Public Member Functions

static void validateGeometry (QgsGeometry *g, QList< QgsGeometry::Error > &errors)
 Validate geometry and produce a list of geometry errors.

Private Member Functions

void validatePolyline (int i, QgsPolyline polyline, bool ring=false)
void validatePolygon (int i, const QgsPolygon &polygon)
void checkRingIntersections (int p0, int i0, const QgsPolyline &ring0, int p1, int i1, const QgsPolyline &ring1)
double distLine2Point (QgsPoint p, QgsVector v, QgsPoint q)
bool intersectLines (QgsPoint p, QgsVector v, QgsPoint q, QgsVector w, QgsPoint &s)
bool ringInRing (const QgsPolyline &inside, const QgsPolyline &outside)
bool pointInRing (const QgsPolyline &ring, const QgsPoint &p)

Private Attributes

QgsGeometry mG
QList< QgsGeometry::Error > * mErrors
bool mStop
int mErrorCount

Detailed Description

Definition at line 22 of file qgsgeometryvalidator.h.

Constructor & Destructor Documentation

QgsGeometryValidator::QgsGeometryValidator ( QgsGeometry g,
QList< QgsGeometry::Error > *  errors = 0 


Definition at line 23 of file qgsgeometryvalidator.cpp.

References mG.

Referenced by validateGeometry().

QgsGeometryValidator::~QgsGeometryValidator ( )

Definition at line 34 of file qgsgeometryvalidator.cpp.

References stop().

Member Function Documentation

void QgsGeometryValidator::addError ( QgsGeometry::Error  e)

Definition at line 342 of file qgsgeometryvalidator.cpp.

References mErrors.

Referenced by validateGeometry().

void QgsGeometryValidator::checkRingIntersections ( int  p0,
int  i0,
const QgsPolyline ring0,
int  p1,
int  i1,
const QgsPolyline ring1 
double QgsGeometryValidator::distLine2Point ( QgsPoint  p,
QgsVector  v,
QgsPoint  q 
void QgsGeometryValidator::errorFound ( QgsGeometry::Error  )
bool QgsGeometryValidator::intersectLines ( QgsPoint  p,
QgsVector  v,
QgsPoint  q,
QgsVector  w,
QgsPoint s 
bool QgsGeometryValidator::pointInRing ( const QgsPolyline ring,
const QgsPoint p 

Definition at line 387 of file qgsgeometryvalidator.cpp.

References mStop, QgsPoint::x(), and QgsPoint::y().

Referenced by ringInRing().

bool QgsGeometryValidator::ringInRing ( const QgsPolyline inside,
const QgsPolyline outside 

Definition at line 410 of file qgsgeometryvalidator.cpp.

References mStop, and pointInRing().

Referenced by run(), and validatePolygon().

void QgsGeometryValidator::run ( )
void QgsGeometryValidator::stop ( )

Definition at line 40 of file qgsgeometryvalidator.cpp.

References mStop.

Referenced by ~QgsGeometryValidator().

void QgsGeometryValidator::validateGeometry ( QgsGeometry g,
QList< QgsGeometry::Error > &  errors 

Validate geometry and produce a list of geometry errors.

added in 1.9

Definition at line 348 of file qgsgeometryvalidator.cpp.

References addError(), errorFound(), QgsGeometryValidator(), and run().

void QgsGeometryValidator::validatePolygon ( int  i,
const QgsPolygon polygon 
void QgsGeometryValidator::validatePolyline ( int  i,
QgsPolyline  polyline,
bool  ring = false 

Member Data Documentation

int QgsGeometryValidator::mErrorCount
QList<QgsGeometry::Error>* QgsGeometryValidator::mErrors

Definition at line 55 of file qgsgeometryvalidator.h.

Referenced by addError().

QgsGeometry QgsGeometryValidator::mG

Definition at line 54 of file qgsgeometryvalidator.h.

Referenced by QgsGeometryValidator(), and run().

bool QgsGeometryValidator::mStop

The documentation for this class was generated from the following files: