Quantum GIS API Documentation  1.8
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
QgsGeometryValidator Class Reference

#include <qgsgeometryvalidator.h>

Collaboration diagram for QgsGeometryValidator:
Collaboration graph

List of all members.

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


Definition at line 23 of file qgsgeometryvalidator.cpp.

References mG.

Referenced by validateGeometry().

Definition at line 34 of file qgsgeometryvalidator.cpp.

References stop().

Member Function Documentation

Definition at line 332 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]
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 377 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 400 of file qgsgeometryvalidator.cpp.

References mStop, and pointInRing().

Referenced by run(), and validatePolygon().

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.

added in 1.9

Definition at line 338 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

Definition at line 55 of file qgsgeometryvalidator.h.

Referenced by addError().

Definition at line 54 of file qgsgeometryvalidator.h.

Referenced by QgsGeometryValidator(), and run().

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines