nearestPoints method

List<Coordinate> nearestPoints()

Report the coordinates of the nearest points in the input geometries. The points are presented in the same order as the input Geometries.

@return a pair of {@link Coordinate}s of the nearest points

Implementation

List<Coordinate> nearestPoints() {
  computeMinDistance();
  List<Coordinate> nearestPts = [
    minDistanceLocation![0]!.getCoordinate(),
    minDistanceLocation![1]!.getCoordinate()
  ];
  return nearestPts;
}