GEOS
3.14.0dev
|
Computes the distance between a point and a geometry (which may be a collection containing any type of geometry). More...
#include <IndexedDistanceToPoint.h>
Public Member Functions | |
IndexedDistanceToPoint (const Geometry &geom) | |
Creates an instance to find the distance from points to a geometry. More... | |
double | distance (const Point &pt) |
Computes the distance from the base geometry to the given point. More... | |
std::unique_ptr< geom::CoordinateSequence > | nearestPoints (const Point &pt) |
Computes the nearest point on the geometry to the point. More... | |
Computes the distance between a point and a geometry (which may be a collection containing any type of geometry).
Also computes the pair of points containing the input point and the nearest point on the geometry.
geos::algorithm::construct::IndexedDistanceToPoint::IndexedDistanceToPoint | ( | const Geometry & | geom | ) |
Creates an instance to find the distance from points to a geometry.
geom | the geometry to compute distances to |
double geos::algorithm::construct::IndexedDistanceToPoint::distance | ( | const Point & | pt | ) |
Computes the distance from the base geometry to the given point.
pt | the point to compute the distance to |
std::unique_ptr<geom::CoordinateSequence> geos::algorithm::construct::IndexedDistanceToPoint::nearestPoints | ( | const Point & | pt | ) |
Computes the nearest point on the geometry to the point.
The first location lies on the geometry, and the second location is the provided point.
pt | the point to compute the nearest point for |