|
JTS Topology Suite version 1.13 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vividsolutions.jts.operation.distance3d.Distance3DOp
public class Distance3DOp
Find two points on two Geometry
s which lie within a given distance,
or else are the nearest points on the geometries (in which case this also
provides the distance between the geometries).
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.
Constructor Summary | |
---|---|
Distance3DOp(Geometry g0,
Geometry g1)
Constructs a DistanceOp that computes the distance and nearest points between the two specified geometries. |
|
Distance3DOp(Geometry g0,
Geometry g1,
double terminateDistance)
Constructs a DistanceOp that computes the distance and nearest points between the two specified geometries. |
Method Summary | |
---|---|
double |
distance()
Report the distance between the nearest points on the input geometries. |
static double |
distance(Geometry g0,
Geometry g1)
Compute the distance between the nearest points of two geometries. |
static boolean |
isWithinDistance(Geometry g0,
Geometry g1,
double distance)
Test whether two geometries lie within a given distance of each other. |
GeometryLocation[] |
nearestLocations()
Report the locations of the nearest points in the input geometries. |
Coordinate[] |
nearestPoints()
Report the coordinates of the nearest points in the input geometries. |
static Coordinate[] |
nearestPoints(Geometry g0,
Geometry g1)
Compute the the nearest 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 Distance3DOp(Geometry g0, Geometry g1)
g0
- a Geometryg1
- a Geometrypublic Distance3DOp(Geometry g0, Geometry g1, double terminateDistance)
g0
- a Geometryg1
- a GeometryterminateDistance
- the distance on which to terminate the searchMethod Detail |
---|
public static double distance(Geometry g0, Geometry g1)
g0
- a Geometry
g1
- another Geometry
public static boolean isWithinDistance(Geometry g0, Geometry g1, double distance)
g0
- a Geometry
g1
- another Geometry
distance
- the distance to test
public static Coordinate[] nearestPoints(Geometry g0, Geometry g1)
g0
- a Geometry
g1
- another Geometry
public double distance()
java.lang.IllegalArgumentException
- if either input geometry is nullpublic Coordinate[] nearestPoints()
Coordinate
s of the nearest pointspublic GeometryLocation[] nearestLocations()
GeometryLocation
s for the nearest points
|
JTS Topology Suite version 1.13 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |