com.vividsolutions.jts.operation.predicate
Class RectangleIntersects
java.lang.Object
com.vividsolutions.jts.operation.predicate.RectangleIntersects
public class RectangleIntersects
extends java.lang.Object
Optimized implementation of spatial predicate "intersects"
for cases where the first
Geometry
is a rectangle.
As a further optimization,
this class can be used directly to test many geometries against a single
rectangle.
static int | MAXIMUM_SCAN_SEGMENT_COUNT - Crossover size at which brute-force intersection scanning
is slower than indexed intersection detection.
|
MAXIMUM_SCAN_SEGMENT_COUNT
public static final int MAXIMUM_SCAN_SEGMENT_COUNT
Crossover size at which brute-force intersection scanning
is slower than indexed intersection detection.
Must be determined empirically. Should err on the
safe side by making value smaller rather than larger.
RectangleIntersects
public RectangleIntersects(Polygon rectangle)
Create a new intersects computer for a rectangle.
rectangle
- a rectangular geometry
intersects
public boolean intersects(Geometry geom)