RectangleContains class
Optimized implementation of the contains spatial predicate for cases where the first {@link Geometry} is a rectangle. This class works for all input geometries, including {@link 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
Constructors
- RectangleContains(Polygon rectangle)
- Create a new contains computer for two geometries.
Properties
Methods
-
contains(
Geometry geom) → bool -
isContainedInBoundary(
Geometry geom) → bool -
isLineSegmentContainedInBoundary(
Coordinate p0, Coordinate p1) → bool - Tests if a line segment is contained in the boundary of the target rectangle. @param p0 an endpoint of the segment @param p1 an endpoint of the segment @return true if the line segment is contained in the boundary
-
isLineStringContainedInBoundary(
LineString line) → bool - Tests if a linestring is completely contained in the boundary of the target rectangle. @param line the linestring to test @return true if the linestring is contained in the boundary
-
isPointContainedInBoundary(
Point point) → bool -
isPointContainedInBoundaryCoord(
Coordinate pt) → bool - Tests if a point is contained in the boundary of the target rectangle.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
containsStatic(
Polygon rectangle, Geometry b) → bool - Tests whether a rectangle contains a given geometry.