Class RectangleIntersects
java.lang.Object
org.locationtech.jts.operation.predicate.RectangleIntersects
Implementation of the intersects spatial predicate
optimized for the case where one
Geometry
is a rectangle.
This class works for all
input geometries, including GeometryCollection
s.
As a further optimization, this class can be used in batch style to test many geometries against a single rectangle.
- Version:
- 1.7
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRectangleIntersects
(Polygon rectangle) Create a new intersects computer for a rectangle. -
Method Summary
Modifier and TypeMethodDescriptionboolean
intersects
(Geometry geom) Tests whether the given Geometry intersects the query rectangle.static boolean
intersects
(Polygon rectangle, Geometry b) Tests whether a rectangle intersects a given geometry.
-
Field Details
-
rectangle
-
rectEnv
-
-
Constructor Details
-
RectangleIntersects
Create a new intersects computer for a rectangle.- Parameters:
rectangle
- a rectangular Polygon
-
-
Method Details
-
intersects
Tests whether a rectangle intersects a given geometry.- Parameters:
rectangle
- a rectangular Polygonb
- a Geometry of any type- Returns:
- true if the geometries intersect
-
intersects
Tests whether the given Geometry intersects the query rectangle.- Parameters:
geom
- the Geometry to test (may be of any type)- Returns:
- true if the geometry intersects the query rectangle
-