public class IndexedPointInAreaLocator extends java.lang.Object implements PointOnGeometryLocator
Location
of Coordinate
s 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
.
Polygonal
and LinearRing
geometries
are supported.
Thread-safe and immutable.
Modifier and Type | Class and Description |
---|---|
private static class |
IndexedPointInAreaLocator.IntervalIndexedGeometry |
private static class |
IndexedPointInAreaLocator.SegmentVisitor |
Modifier and Type | Field and Description |
---|---|
private IndexedPointInAreaLocator.IntervalIndexedGeometry |
index |
Constructor and Description |
---|
IndexedPointInAreaLocator(Geometry g)
Creates a new locator for a given
Geometry . |
Modifier and Type | Method and Description |
---|---|
int |
locate(Coordinate p)
|
private final IndexedPointInAreaLocator.IntervalIndexedGeometry index
public IndexedPointInAreaLocator(Geometry g)
g
- the Geometry to locate inpublic int locate(Coordinate p)
locate
in interface PointOnGeometryLocator
p
- the point to test