#include <DistanceOp.h>
Public Member Functions | |
| DistanceOp (const geom::Geometry *g0, const geom::Geometry *g1) | |
| DistanceOp (const geom::Geometry &g0, const geom::Geometry &g1) | |
| Constructs a DistanceOp that computes the distance and nearest points between the two specified geometries. | |
| DistanceOp (const geom::Geometry &g0, const geom::Geometry &g1, double terminateDistance) | |
| Constructs a DistanceOp that computes the distance and nearest points between the two specified geometries. | |
| double | distance () |
| geom::CoordinateSequence * | closestPoints () |
| geom::CoordinateSequence * | nearestPoints () |
Static Public Member Functions | |
| static double | distance (const geom::Geometry &g0, const geom::Geometry &g1) |
| Compute the distance between the nearest points of two geometries. | |
| static double | distance (const geom::Geometry *g0, const geom::Geometry *g1) |
| static bool | isWithinDistance (const geom::Geometry &g0, const geom::Geometry &g1, double distance) |
| Test whether two geometries lie within a given distance of each other. | |
| static geom::CoordinateSequence * | nearestPoints (const geom::Geometry *g0, const geom::Geometry *g1) |
| static geom::CoordinateSequence * | closestPoints (const geom::Geometry *g0, const geom::Geometry *g1) |
The distance computation also finds a pair of points in the input geometries which have the minimum distance between them. If a point lies in the interior of a line segment, the coordinate computed is a close approximation to the exact point.
The algorithms used are straightforward O(n^2) comparisons. This worst-case performance could be improved on by using Voronoi techniques or spatial indexes.
|
||||||||||||
|
|
|
||||||||||||
|
Constructs a DistanceOp that computes the distance and nearest points between the two specified geometries.
|
|
||||||||||||||||
|
Constructs a DistanceOp that computes the distance and nearest points between the two specified geometries.
|
|
|
Report the coordinates of the closest points in the input geometries. The points are presented in the same order as the input Geometries.
|
|
||||||||||||
|
Compute the the closest points of two geometries. The points are presented in the same order as the input Geometries.
|
|
|
Report the distance between the closest points on the input geometries.
|
|
||||||||||||
|
|
|
||||||||||||
|
Compute the distance between the nearest points of two geometries.
|
|
||||||||||||||||
|
Test whether two geometries lie within a given distance of each other.
|
|
|
Report the coordinates of the nearest points in the input geometries. The points are presented in the same order as the input Geometries.
|
|
||||||||||||
|
Compute the the nearest points of two geometries. The points are presented in the same order as the input Geometries.
|
1.4.4