maxDistance static method
Computes the maximum distance out of a set of points to a linestring.
@param pts the points @param line the linestring vertices @return the maximum distance
Implementation
static double maxDistance(List<Coordinate> pts, List<Coordinate> line) {
double maxDistance = 0;
for (Coordinate p in pts) {
double dist = Distance.pointToSegmentString(p, line);
if (dist > maxDistance) {
maxDistance = dist;
}
}
return maxDistance;
}