public class SimplePointInAreaLocator extends Object implements PointOnGeometryLocator
Polygonal Geometry,
using a simple O(n) algorithm.
This algorithm is suitable for use in cases where
only one or a few points will be tested against a given area.
The algorithm used is only guaranteed to return correct results for points which are not on the boundary of the Geometry.
| Constructor and Description |
|---|
SimplePointInAreaLocator(Geometry geom) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
containsPointInPolygon(Coordinate p,
Polygon poly) |
int |
locate(Coordinate p)
|
static int |
locate(Coordinate p,
Geometry geom)
|
public SimplePointInAreaLocator(Geometry geom)
public static int locate(Coordinate p, Geometry geom)
Location of a point in an areal Geometry.
Currently this will never return a value of BOUNDARY.p - the point to testgeom - the areal geometry to testpublic static boolean containsPointInPolygon(Coordinate p, Polygon poly)
public int locate(Coordinate p)
PointOnGeometryLocatorlocate in interface PointOnGeometryLocatorp - the point to testCopyright © 2015. All rights reserved.