public class RectangleIntersects extends Object
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.
Constructor and Description |
---|
RectangleIntersects(Polygon rectangle)
Create a new intersects computer for a rectangle.
|
Modifier and Type | Method and Description |
---|---|
boolean |
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.
|
public RectangleIntersects(Polygon rectangle)
rectangle
- a rectangular Polygonpublic static boolean intersects(Polygon rectangle, Geometry b)
rectangle
- a rectangular Polygonb
- a Geometry of any typepublic boolean intersects(Geometry geom)
geom
- the Geometry to test (may be of any type)Copyright © 2022. All rights reserved.