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.
double | distance (const Point &pt)
| Computes the distance from the base geometry to the given point.
std::unique_ptr< geom::CoordinateSequence > | nearestPoints (const Point &pt)
| Computes the nearest point on the geometry to the point.

## 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

  geom | the 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

  pt | the 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

  pt | the point to compute the nearest point for

Returns
  the points that are nearest

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

- IndexedDistanceToPoint.h