locate method

int locate(
  1. Coordinate pt
)

Determines the {@link Location} of the given {@link Coordinate} in this geometry.

@param pt the point to test @return the location of the point in the geometry

Implementation

int locate(Coordinate pt) {
  if (parentGeom is Polygonal && parentGeom!.getNumGeometries() > 50) {
    // lazily init point locator
    if (areaPtLocator == null) {
      areaPtLocator = new IndexedPointInAreaLocator(parentGeom!);
    }
    return areaPtLocator!.locate(pt);
  }
  return ptLocator.locate(pt, parentGeom!);
}