Package com.github.micycle1.geoblitz
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintlocate(org.locationtech.jts.geom.Coordinate p) Determines theLocationof a point in an arealGeometry.
-
Constructor Details
-
YStripesPointInAreaLocator
public YStripesPointInAreaLocator(org.locationtech.jts.geom.Geometry geom)
-
-
Method Details
-
locate
public int locate(org.locationtech.jts.geom.Coordinate p) Determines theLocationof a point in an arealGeometry.- Specified by:
locatein interfaceorg.locationtech.jts.algorithm.locate.PointOnGeometryLocator- Parameters:
p- the point to test- Returns:
- the location of the point in the geometry
-