GEOS  3.13.0dev
Public Member Functions | List of all members
geos::algorithm::construct::IndexedDistanceToPoint Class Reference

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::CoordinateSequencenearestPoints (const Point &pt)
 Computes the nearest point on the geometry to the point. More...
 

Detailed Description

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.

Author
Martin Davis

Constructor & Destructor Documentation

◆ IndexedDistanceToPoint()

geos::algorithm::construct::IndexedDistanceToPoint::IndexedDistanceToPoint ( const Geometry geom)

Creates an instance to find the distance from points to a geometry.

Parameters
geomthe geometry to compute distances to

Member Function Documentation

◆ distance()

double geos::algorithm::construct::IndexedDistanceToPoint::distance ( const Point pt)

Computes the distance from the base geometry to the given point.

Parameters
ptthe point to compute the distance to
Returns
the computed distance

◆ nearestPoints()

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.

Parameters
ptthe point to compute the nearest point for
Returns
the points that are nearest

The documentation for this class was generated from the following file: