Skip to content
Permalink
Browse files

add python bindings to QgsGeometry::validateGeometry

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14462 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Oct 31, 2010
1 parent 51eb2ad commit afd377ce941dfe37fcfa97c8e831b72f469d7feb
Showing with 17 additions and 1 deletion.
  1. +14 −1 python/core/qgsgeometry.sip
  2. +3 −0 src/core/qgsgeometry.h
@@ -15,7 +15,7 @@ typedef QVector< QVector<QgsPoint> > QgsMultiPolyline;
typedef QVector< QVector< QVector<QgsPoint> > > QgsMultiPolygon;

typedef unsigned int size_t;

class QgsGeometry
{
%TypeHeaderCode
@@ -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

@@ -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 );

0 comments on commit afd377c

Please sign in to comment.
You can’t perform that action at this time.