Package org.locationtech.jts.algorithm
Class PointLocator
java.lang.Object
org.locationtech.jts.algorithm.PointLocator
Computes the topological (
Location
)
of a single point to a Geometry
.
A BoundaryNodeRule
may be specified
to control the evaluation of whether the point lies on the boundary or not
The default rule is to use the the SFS Boundary Determination Rule
Notes:
LinearRing
s do not enclose any area - points inside the ring are still in the EXTERIOR of the ring.
- Version:
- 1.7
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
intersects
(Coordinate p, Geometry geom) Convenience method to test a point for intersection with a Geometryint
locate
(Coordinate p, Geometry geom) Computes the topological relationship (Location
) of a single point to a Geometry.
-
Constructor Details
-
PointLocator
public PointLocator() -
PointLocator
-
-
Method Details
-
intersects
Convenience method to test a point for intersection with a Geometry- Parameters:
p
- the coordinate to testgeom
- the Geometry to test- Returns:
true
if the point is in the interior or boundary of the Geometry
-
locate
Computes the topological relationship (Location
) of a single point to a Geometry. It handles both single-element and multi-element Geometries. The algorithm for multi-part Geometries takes into account the SFS Boundary Determination Rule.- Returns:
- the
Location
of the point relative to the input Geometry
-