GEOS
3.9.1dev
|
Optimized implementation of spatial predicate "contains" for cases where the first Geometry is a rectangle. More...
#include <RectangleContains.h>
Public Member Functions | |
RectangleContains (const geom::Polygon &rect) | |
bool | contains (const geom::Geometry &geom) |
RectangleContains (const RectangleContains &other)=delete | |
RectangleContains & | operator= (const RectangleContains &rhs)=delete |
Static Public Member Functions | |
static bool | contains (const geom::Polygon &rect, const geom::Geometry &b) |
Private Member Functions | |
bool | isContainedInBoundary (const geom::Geometry &geom) |
bool | isPointContainedInBoundary (const geom::Point &geom) |
bool | isPointContainedInBoundary (const geom::Coordinate &pt) |
Tests if a point is contained in the boundary of the target rectangle. More... | |
bool | isLineStringContainedInBoundary (const geom::LineString &line) |
Tests if a linestring is completely contained in the boundary of the target rectangle. More... | |
bool | isLineSegmentContainedInBoundary (const geom::Coordinate &p0, const geom::Coordinate &p1) |
Tests if a line segment is contained in the boundary of the target rectangle. More... | |
Private Attributes | |
const geom::Envelope & | rectEnv |
Optimized implementation of spatial predicate "contains" 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.
Definition at line 51 of file RectangleContains.h.
|
inline |
Create a new contains computer for two geometries.
rect | a rectangular geometry |
Definition at line 104 of file RectangleContains.h.
|
delete |
|
inlinestatic |
Definition at line 93 of file RectangleContains.h.
References contains().
Referenced by contains().
bool geos::operation::predicate::RectangleContains::contains | ( | const geom::Geometry & | geom | ) |
|
private |
|
private |
Tests if a line segment is contained in the boundary of the target rectangle.
p0 | an endpoint of the segment |
p1 | an endpoint of the segment |
|
private |
Tests if a linestring is completely contained in the boundary of the target rectangle.
line | the linestring to test |
|
private |
|
private |
Tests if a point is contained in the boundary of the target rectangle.
pt | the point to test |
|
delete |
|
private |
Definition at line 55 of file RectangleContains.h.