com.vividsolutions.jts.operation.predicate
Class RectangleContains
java.lang.Object
com.vividsolutions.jts.operation.predicate.RectangleContains
public class RectangleContains
- extends java.lang.Object
Optimized implementation of the contains spatial predicate
for cases where the first Geometry
is a rectangle.
This class works for all input geometries, including
GeometryCollection
s.
As a further optimization,
this class can be used to test
many geometries against a single
rectangle in a slightly more efficient way.
- Version:
- 1.7
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RectangleContains
public RectangleContains(Polygon rectangle)
- Create a new contains computer for two geometries.
- Parameters:
rectangle
- a rectangular geometry
contains
public static boolean contains(Polygon rectangle,
Geometry b)
- Tests whether a rectangle contains a given geometry.
- Parameters:
rectangle
- a rectangular Polygonb
- a Geometry of any type
- Returns:
- true if the geometries intersect
contains
public boolean contains(Geometry geom)