containsPoint method

bool containsPoint(
  1. Coordinate p
)

This method will cause the ring to be computed. It will also check any holes, if they have been assigned.

Implementation

bool containsPoint(Coordinate p) {
  LinearRing shell = getLinearRing()!;
  Envelope env = shell.getEnvelopeInternal();
  if (!env.containsCoordinate(p)) return false;
  if (!PointLocation.isInRing(p, shell.getCoordinates())) return false;

  for (Iterator i = holes.iterator; i.moveNext();) {
    EdgeRing hole = i.current as EdgeRing;
    if (hole.containsPoint(p)) return false;
  }
  return true;
}