Skip to content

Commit 4ab1c8f

Browse files
author
jef
committed
add python bindings to QgsGeometry::validateGeometry
git-svn-id: http://svn.osgeo.org/qgis/trunk@14462 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent a077527 commit 4ab1c8f

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

python/core/qgsgeometry.sip

+14-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ typedef QVector< QVector<QgsPoint> > QgsMultiPolyline;
1515
typedef QVector< QVector< QVector<QgsPoint> > > QgsMultiPolygon;
1616

1717
typedef unsigned int size_t;
18-
18+
1919
class QgsGeometry
2020
{
2121
%TypeHeaderCode
@@ -376,5 +376,18 @@ not disjoint with existing polygons of the feature*/
376376
*/
377377
int avoidIntersections();
378378

379+
class Error
380+
{
381+
Error( QString m );
382+
Error( QString m, QgsPoint p );
383+
QString what();
384+
QgsPoint where();
385+
bool hasWhere();
386+
};
387+
388+
/** Validate geometry and produce a list of geometry errors
389+
* @note python binding added in 1.6
390+
**/
391+
void validateGeometry( QList<QgsGeometry::Error> &errors );
379392
}; // class QgsGeometry
380393

src/core/qgsgeometry.h

+3
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,9 @@ class CORE_EXPORT QgsGeometry
430430
bool hasWhere() { return hasLocation; }
431431
};
432432

433+
/** Validate geometry and produce a list of geometry errors
434+
* @note added in 1.5
435+
**/
433436
void validateGeometry( QList<Error> &errors );
434437

435438
static void validatePolyline( QList<Error> &errors, int i, QgsPolyline polyline, bool ring = false );

0 commit comments

Comments
 (0)