Class YStripesPointInAreaLocator

java.lang.Object
com.github.micycle1.geoblitz.YStripesPointInAreaLocator
All Implemented Interfaces:
org.locationtech.jts.algorithm.locate.PointOnGeometryLocator

public final class YStripesPointInAreaLocator extends Object implements org.locationtech.jts.algorithm.locate.PointOnGeometryLocator
Point-in-area locator for areal Geometries that uses per-polygon Y-stripe locators to test points efficiently.

Each polygonal component of the input Geometry is handled by a YStripesPointInPolygonLocator; when multiple polygonal components are present these per-polygon locators are organized in an STRtree for efficient candidate selection. A single-polygon input uses a direct fast-path, and geometries with no polygonal elements always report EXTERIOR.

Instances are immutable and safe for concurrent use, and are intended for repeated point-in-area queries against a fixed Geometry.

Author:
Michael Carleton
See Also:
  • YStripesPointInPolygonLocator
  • Constructor Details

    • YStripesPointInAreaLocator

      public YStripesPointInAreaLocator(org.locationtech.jts.geom.Geometry geom)
  • Method Details

    • locate

      public int locate(org.locationtech.jts.geom.Coordinate p)
      Determines the Location of a point in an areal Geometry.
      Specified by:
      locate in interface org.locationtech.jts.algorithm.locate.PointOnGeometryLocator
      Parameters:
      p - the point to test
      Returns:
      the location of the point in the geometry