[QGIS Commit] r14462 - in trunk/qgis: python/core src/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Oct 31 12:41:54 EDT 2010


Author: jef
Date: 2010-10-31 09:41:54 -0700 (Sun, 31 Oct 2010)
New Revision: 14462

Modified:
   trunk/qgis/python/core/qgsgeometry.sip
   trunk/qgis/src/core/qgsgeometry.h
Log:
add python bindings to QgsGeometry::validateGeometry

Modified: trunk/qgis/python/core/qgsgeometry.sip
===================================================================
--- trunk/qgis/python/core/qgsgeometry.sip	2010-10-31 10:53:06 UTC (rev 14461)
+++ trunk/qgis/python/core/qgsgeometry.sip	2010-10-31 16:41:54 UTC (rev 14462)
@@ -15,7 +15,7 @@
 typedef QVector< QVector< QVector<QgsPoint> > > QgsMultiPolygon;
 
 typedef unsigned int size_t;
-    
+
 class QgsGeometry
 {
 %TypeHeaderCode
@@ -376,5 +376,18 @@
      */
     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
 

Modified: trunk/qgis/src/core/qgsgeometry.h
===================================================================
--- trunk/qgis/src/core/qgsgeometry.h	2010-10-31 10:53:06 UTC (rev 14461)
+++ trunk/qgis/src/core/qgsgeometry.h	2010-10-31 16:41:54 UTC (rev 14462)
@@ -430,6 +430,9 @@
         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 );



More information about the QGIS-commit mailing list