|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vividsolutions.jts.operation.distance.DistanceOp
Computes the distance and
closest points between two Geometry
s.
The distance computation finds a pair of points in the input geometries which have minimum distance between them. These points may not be vertices of the geometries, but may lie in the interior of a line segment. In this case 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.
Constructor Summary | |
DistanceOp(Geometry g0,
Geometry g1)
Constructs a DistanceOp that computes the distance and closest points between the two specified geometries. |
Method Summary | |
GeometryLocation[] |
closestLocations()
Report the locations of the closest points in the input geometries. |
Coordinate[] |
closestPoints()
Report the coordinates of the closest points in the input geometries. |
static Coordinate[] |
closestPoints(Geometry g0,
Geometry g1)
Compute the the closest points of two geometries. |
double |
distance()
Report the distance between the closest points on the input geometries. |
static double |
distance(Geometry g0,
Geometry g1)
Compute the distance between the closest points of two geometries. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DistanceOp(Geometry g0, Geometry g1)
Method Detail |
public static double distance(Geometry g0, Geometry g1)
g0
- a Geometry
g1
- another Geometry
public static Coordinate[] closestPoints(Geometry g0, Geometry g1)
g0
- a Geometry
g1
- another Geometry
public double distance()
public Coordinate[] closestPoints()
Coordinate
s of the closest pointspublic GeometryLocation[] closestLocations()
GeometryLocation
s for the closest points
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |