mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Add interoplate to QgsGeometry
This commit is contained in:
parent
80c251d2a9
commit
e8bbc2de71
@ -298,6 +298,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 );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user