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
[legend]

Public Slots

void addError (QgsGeometry::Error)

Signals

void errorFound (QgsGeometry::Error)

Public Member Functions

 QgsGeometryValidator (QgsGeometry *g, QList< QgsGeometry::Error > *errors=0)
 Constructor.
 ~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 
)

Constructor.

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)
slot

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 
)
private
double QgsGeometryValidator::distLine2Point ( QgsPoint  p,
QgsVector  v,
QgsPoint  q 
)
private
void QgsGeometryValidator::errorFound ( QgsGeometry::Error  )
signal
bool QgsGeometryValidator::intersectLines ( QgsPoint  p,
QgsVector  v,
QgsPoint  q,
QgsVector  w,
QgsPoint s 
)
private
bool QgsGeometryValidator::pointInRing ( const QgsPolyline ring,
const QgsPoint p 
)
private

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 
)
private

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 
)
static

Validate geometry and produce a list of geometry errors.

Note
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 
)
private
void QgsGeometryValidator::validatePolyline ( int  i,
QgsPolyline  polyline,
bool  ring = false 
)
private

Member Data Documentation

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

Definition at line 55 of file qgsgeometryvalidator.h.

Referenced by addError().

QgsGeometry QgsGeometryValidator::mG
private

Definition at line 54 of file qgsgeometryvalidator.h.

Referenced by QgsGeometryValidator(), and run().

bool QgsGeometryValidator::mStop
private

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