distance method

double distance(
  1. Point pt
)

Computes the distance from a point to the geometry.

@param pt the input point @return the distance to the geometry

Implementation

double distance(Point pt) {
  init();
  //-- distance is 0 if point is inside a target polygon
  if (isInArea(pt)) {
    return 0;
  }
  return facetDistance!.facetDistance(pt);
}