Skip to content

Commit

Permalink
Update python bindings for QgsGeometry
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed May 26, 2015
1 parent 930ad68 commit b5801af
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions python/core/geometry/qgsgeometry.sip
Expand Up @@ -480,5 +480,47 @@ class QgsGeometry
@returns the new computed QgsGeometry, or null
*/
static QgsGeometry *unaryUnion( const QList<QgsGeometry*>& geometryList ) /Factory/;

/** Compares two polylines for equality within a specified tolerance.
* @param p1 first polyline
* @param p2 second polyline
* @param epsilon maximum difference for coordinates between the polylines
* @returns true if polylines have the same number of points and all
* points are equal within the specified tolerance
* @note added in QGIS 2.9
*/
static bool compare( const QgsPolyline& p1, const QgsPolyline& p2, double epsilon = 4 * DBL_EPSILON );

/** Compares two polygons for equality within a specified tolerance.
* @param p1 first polygon
* @param p2 second polygon
* @param epsilon maximum difference for coordinates between the polygons
* @returns true if polygons have the same number of rings, and each ring has the same
* number of points and all points are equal within the specified tolerance
* @note added in QGIS 2.9
*/
static bool compare( const QgsPolygon& p1, const QgsPolygon& p2, double epsilon = 4 * DBL_EPSILON );

/** Compares two multipolygons for equality within a specified tolerance.
* @param p1 first multipolygon
* @param p2 second multipolygon
* @param epsilon maximum difference for coordinates between the multipolygons
* @returns true if multipolygons have the same number of polygons, the polygons have the same number
* of rings, and each ring has the same number of points and all points are equal within the specified
* tolerance
* @note added in QGIS 2.9
*/
static bool compare( const QgsMultiPolygon& p1, const QgsMultiPolygon& p2, double epsilon = 4 * DBL_EPSILON );

/**Smooths a geometry by rounding off corners using the Chaikin algorithm. This operation
* roughly doubles the number of vertices in a geometry.
* @param iterations number of smoothing iterations to run. More iterations results
* in a smoother geometry
* @param offset fraction of line to create new vertices along, between 0 and 1.0
* eg the default value of 0.25 will create new vertices 25% and 75% along each line segment
* of the geometry for each iteration. Smaller values result in "tighter" smoothing.
* @note added in 2.9
*/
QgsGeometry* smooth( const unsigned int iterations, const double offset ) const;
}; // class QgsGeometry

0 comments on commit b5801af

Please sign in to comment.