Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add python bindings to QgsGeometry::validateGeometry
git-svn-id: http://svn.osgeo.org/qgis/trunk@14462 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Oct 31, 2010
1 parent a077527 commit 4ab1c8f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
15 changes: 14 additions & 1 deletion python/core/qgsgeometry.sip
Expand Up @@ -15,7 +15,7 @@ typedef QVector< QVector<QgsPoint> > QgsMultiPolyline;
typedef QVector< QVector< QVector<QgsPoint> > > QgsMultiPolygon;

typedef unsigned int size_t;

class QgsGeometry
{
%TypeHeaderCode
Expand Down Expand Up @@ -376,5 +376,18 @@ not disjoint with existing polygons of the feature*/
*/
int avoidIntersections();

class Error
{
Error( QString m );
Error( QString m, QgsPoint p );
QString what();
QgsPoint where();
bool hasWhere();
};

/** Validate geometry and produce a list of geometry errors
* @note python binding added in 1.6
**/
void validateGeometry( QList<QgsGeometry::Error> &errors );
}; // class QgsGeometry

3 changes: 3 additions & 0 deletions src/core/qgsgeometry.h
Expand Up @@ -430,6 +430,9 @@ class CORE_EXPORT QgsGeometry
bool hasWhere() { return hasLocation; }
};

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

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

0 comments on commit 4ab1c8f

Please sign in to comment.