QGIS API Documentation
2.0.1-Dufour
|
#include <qgsgeometryvalidator.h>
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 |
Definition at line 22 of file qgsgeometryvalidator.h.
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().
|
slot |
Definition at line 342 of file qgsgeometryvalidator.cpp.
References mErrors.
Referenced by validateGeometry().
|
private |
Definition at line 45 of file qgsgeometryvalidator.cpp.
References distLine2Point(), errorFound(), intersectLines(), QgsVector::length(), mErrorCount, mStop, QgsVector::perpVector(), QgsDebugMsg, QgsPoint::toString(), and tr.
Referenced by run(), and validatePolygon().
Definition at line 361 of file qgsgeometryvalidator.cpp.
References QgsVector::length(), tr, QgsVector::x(), QgsPoint::x(), QgsVector::y(), and QgsPoint::y().
Referenced by checkRingIntersections(), and validatePolyline().
|
signal |
Referenced by checkRingIntersections(), run(), validateGeometry(), validatePolygon(), and validatePolyline().
|
private |
Definition at line 371 of file qgsgeometryvalidator.cpp.
References QgsVector::x(), QgsPoint::x(), QgsVector::y(), and QgsPoint::y().
Referenced by checkRingIntersections(), and validatePolyline().
|
private |
Definition at line 387 of file qgsgeometryvalidator.cpp.
References mStop, QgsPoint::x(), and QgsPoint::y().
Referenced by ringInRing().
|
private |
Definition at line 410 of file qgsgeometryvalidator.cpp.
References mStop, and pointInRing().
Referenced by run(), and validatePolygon().
void QgsGeometryValidator::run | ( | ) |
Definition at line 194 of file qgsgeometryvalidator.cpp.
References QgsGeometry::asGeos(), QgsGeometry::asMultiPolygon(), QgsGeometry::asMultiPolyline(), QgsGeometry::asPolygon(), QgsGeometry::asPolyline(), checkRingIntersections(), errorFound(), mErrorCount, mG, mStop, QgsDebugMsg, ringInRing(), tr, validatePolygon(), validatePolyline(), QGis::WKBLineString, QGis::WKBLineString25D, QGis::WKBMultiLineString, QGis::WKBMultiLineString25D, QGis::WKBMultiPoint, QGis::WKBMultiPoint25D, QGis::WKBMultiPolygon, QGis::WKBMultiPolygon25D, QGis::WKBNoGeometry, QGis::WKBPoint, QGis::WKBPoint25D, QGis::WKBPolygon, QGis::WKBPolygon25D, QgsGeometry::wkbType(), and QGis::WKBUnknown.
Referenced by validateGeometry().
void QgsGeometryValidator::stop | ( | ) |
Definition at line 40 of file qgsgeometryvalidator.cpp.
References mStop.
Referenced by ~QgsGeometryValidator().
|
static |
Validate geometry and produce a list of geometry errors.
Definition at line 348 of file qgsgeometryvalidator.cpp.
References addError(), errorFound(), QgsGeometryValidator(), and run().
|
private |
Definition at line 164 of file qgsgeometryvalidator.cpp.
References checkRingIntersections(), errorFound(), mErrorCount, mStop, QgsDebugMsg, ringInRing(), tr, and validatePolyline().
Referenced by run().
|
private |
Definition at line 81 of file qgsgeometryvalidator.cpp.
References distLine2Point(), errorFound(), intersectLines(), QgsVector::length(), mErrorCount, mStop, QgsVector::perpVector(), QgsDebugMsg, QgsPoint::toString(), and tr.
Referenced by run(), and validatePolygon().
|
private |
Definition at line 57 of file qgsgeometryvalidator.h.
Referenced by checkRingIntersections(), run(), validatePolygon(), and validatePolyline().
|
private |
Definition at line 55 of file qgsgeometryvalidator.h.
Referenced by addError().
|
private |
Definition at line 54 of file qgsgeometryvalidator.h.
Referenced by QgsGeometryValidator(), and run().
|
private |
Definition at line 56 of file qgsgeometryvalidator.h.
Referenced by checkRingIntersections(), pointInRing(), ringInRing(), run(), stop(), validatePolygon(), and validatePolyline().