locate method

  1. @override
int locate(
  1. Coordinate p
)
override

Determines the {@link Location} of a point in the {@link Geometry}.

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

Implementation

@override
int locate(Coordinate p) {
  init();

  List<IndexedPointInAreaLocator> results = index!.query(Envelope.fromCoordinate(p)).cast<IndexedPointInAreaLocator>();
  for (IndexedPointInAreaLocator ptLocater in results) {
    int loc = ptLocater.locate(p);
    if (loc != Location.EXTERIOR)
      return loc;
  }
  return Location.EXTERIOR;
}