Class PointPairDistance
java.lang.Object
org.locationtech.jts.algorithm.distance.PointPairDistance
Contains a pair of points and the distance between them.
Provides methods to update with a new point pair with
either maximum or minimum distance.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCoordinate(int i) Gets one of the paired pointsGets the paired pointsdoubleGets the distance between the paired pointsvoidInitializes this instance.voidinitialize(Coordinate p0, Coordinate p1) Initializes the points, computing the distance between them.voidsetMaximum(PointPairDistance ptDist) voidsetMaximum(Coordinate p0, Coordinate p1) voidsetMinimum(PointPairDistance ptDist) voidsetMinimum(Coordinate p0, Coordinate p1) toString()
-
Constructor Details
-
PointPairDistance
public PointPairDistance()Creates an instance of this class
-
-
Method Details
-
initialize
public void initialize()Initializes this instance. -
initialize
Initializes the points, computing the distance between them.- Parameters:
p0- the 1st pointp1- the 2nd point
-
getDistance
public double getDistance()Gets the distance between the paired points- Returns:
- the distance between the paired points
-
getCoordinates
-
getCoordinate
Gets one of the paired points- Parameters:
i- the index of the paired point (0 or 1)- Returns:
- A point
-
setMaximum
-
setMaximum
-
setMinimum
-
setMinimum
-
toString
-