Class IndexedPointInAreaLocator
- java.lang.Object
-
- org.locationtech.jts.algorithm.locate.IndexedPointInAreaLocator
-
- All Implemented Interfaces:
PointOnGeometryLocator
public class IndexedPointInAreaLocator extends java.lang.Object implements PointOnGeometryLocator
Determines theLocationofCoordinates relative to an areal geometry, using indexing for efficiency. This algorithm is suitable for use in cases where many points will be tested against a given area.The Location is computed precisely, in that points located on the geometry boundary or segments will return
Location.BOUNDARY.PolygonalandLinearRinggeometries are supported. Thread-safe and immutable.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classIndexedPointInAreaLocator.IntervalIndexedGeometryprivate static classIndexedPointInAreaLocator.SegmentVisitor
-
Field Summary
Fields Modifier and Type Field Description private IndexedPointInAreaLocator.IntervalIndexedGeometryindex
-
Constructor Summary
Constructors Constructor Description IndexedPointInAreaLocator(Geometry g)Creates a new locator for a givenGeometry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intlocate(Coordinate p)
-
-
-
Field Detail
-
index
private final IndexedPointInAreaLocator.IntervalIndexedGeometry index
-
-
Constructor Detail
-
IndexedPointInAreaLocator
public IndexedPointInAreaLocator(Geometry g)
- Parameters:
g- the Geometry to locate in
-
-
Method Detail
-
locate
public int locate(Coordinate p)
- Specified by:
locatein interfacePointOnGeometryLocator- Parameters:
p- the point to test- Returns:
- the location of the point in the geometry
-
-