GEOS  3.9.1dev
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
geos::operation::predicate::RectangleContains Class Reference

Optimized implementation of spatial predicate "contains" for cases where the first Geometry is a rectangle. More...

#include <RectangleContains.h>

Collaboration diagram for geos::operation::predicate::RectangleContains:
[legend]

Public Member Functions

 RectangleContains (const geom::Polygon &rect)
 
bool contains (const geom::Geometry &geom)
 
 RectangleContains (const RectangleContains &other)=delete
 
RectangleContainsoperator= (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::EnveloperectEnv
 

Detailed Description

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.

Constructor & Destructor Documentation

geos::operation::predicate::RectangleContains::RectangleContains ( const geom::Polygon rect)
inline

Create a new contains computer for two geometries.

Parameters
recta rectangular geometry

Definition at line 104 of file RectangleContains.h.

geos::operation::predicate::RectangleContains::RectangleContains ( const RectangleContains other)
delete

Member Function Documentation

static bool geos::operation::predicate::RectangleContains::contains ( const geom::Polygon rect,
const geom::Geometry b 
)
inlinestatic

Definition at line 93 of file RectangleContains.h.

References contains().

Referenced by contains().

Here is the call graph for this function:

Here is the caller graph for this function:

bool geos::operation::predicate::RectangleContains::contains ( const geom::Geometry geom)
bool geos::operation::predicate::RectangleContains::isContainedInBoundary ( const geom::Geometry geom)
private
bool geos::operation::predicate::RectangleContains::isLineSegmentContainedInBoundary ( const geom::Coordinate p0,
const geom::Coordinate p1 
)
private

Tests if a line segment is contained in the boundary of the target rectangle.

Parameters
p0an endpoint of the segment
p1an endpoint of the segment
Returns
true if the line segment is contained in the boundary
bool geos::operation::predicate::RectangleContains::isLineStringContainedInBoundary ( const geom::LineString line)
private

Tests if a linestring is completely contained in the boundary of the target rectangle.

Parameters
linethe linestring to test
Returns
true if the linestring is contained in the boundary
bool geos::operation::predicate::RectangleContains::isPointContainedInBoundary ( const geom::Point geom)
private
bool geos::operation::predicate::RectangleContains::isPointContainedInBoundary ( const geom::Coordinate pt)
private

Tests if a point is contained in the boundary of the target rectangle.

Parameters
ptthe point to test
Returns
true if the point is contained in the boundary
RectangleContains& geos::operation::predicate::RectangleContains::operator= ( const RectangleContains rhs)
delete

Member Data Documentation

const geom::Envelope& geos::operation::predicate::RectangleContains::rectEnv
private

Definition at line 55 of file RectangleContains.h.


The documentation for this class was generated from the following file: