Skip to content
Permalink
Browse files

Add interoplate to QgsGeometry

  • Loading branch information
NathanW2 committed Jul 29, 2012
1 parent 80c251d commit e8bbc2de715d0b120974b849dec52a5a5ad64cf7
Showing with 22 additions and 0 deletions.
  1. +2 −0 python/core/qgsgeometry.sip
  2. +18 −0 src/core/qgsgeometry.cpp
  3. +2 −0 src/core/qgsgeometry.h
@@ -297,6 +297,8 @@ not disjoint with existing polygons of the feature*/

/** Returns the smallest convex polygon that contains all the points in the geometry. */
QgsGeometry* convexHull() /Factory/;

QgsGeometry* interoplate( double distance ) /Factory/;

/** Returns a geometry representing the points shared by this geometry and other. */
QgsGeometry* intersection(QgsGeometry* geometry) /Factory/;
@@ -6409,6 +6409,24 @@ QgsGeometry* QgsGeometry::convexHull()
CATCH_GEOS( 0 )
}

QgsGeometry* QgsGeometry::interpolate( double distance )
{
if ( !mGeos )
{
exportWkbToGeos();
}
if ( !mGeos )
{
return 0;
}

try
{
return fromGeosGeom( GEOSInterpolate( mGeos, distance ) );
}
CATCH_GEOS( 0 )
}

QgsGeometry* QgsGeometry::intersection( QgsGeometry* geometry )
{
if ( !geometry )
@@ -343,6 +343,8 @@ class CORE_EXPORT QgsGeometry
/** Returns the smallest convex polygon that contains all the points in the geometry. */
QgsGeometry* convexHull();

QgsGeometry* interpolate( double distance );

/** Returns a geometry representing the points shared by this geometry and other. */
QgsGeometry* intersection( QgsGeometry* geometry );

0 comments on commit e8bbc2d

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