GEOS  3.13.0dev
Public Member Functions | Static Public Member Functions | List of all members
geos::geom::prep::PreparedPolygonContainsProperly Class Reference

Computes the containsProperly spatial relationship predicate for PreparedPolygons relative to all other Geometry classes. More...

#include <PreparedPolygonContainsProperly.h>

Inheritance diagram for geos::geom::prep::PreparedPolygonContainsProperly:
geos::geom::prep::PreparedPolygonPredicate

Public Member Functions

 PreparedPolygonContainsProperly (const PreparedPolygon *const prep)
 Creates an instance of this operation. More...
 
bool containsProperly (const geom::Geometry *geom)
 Tests whether this PreparedPolygon containsProperly a given geometry. More...
 
- Public Member Functions inherited from geos::geom::prep::PreparedPolygonPredicate
 PreparedPolygonPredicate (const PreparedPolygon *const p_prepPoly)
 Creates an instance of this operation. More...
 

Static Public Member Functions

static bool containsProperly (const PreparedPolygon *const prep, const geom::Geometry *geom)
 Computes the containsProperly predicate between a PreparedPolygon and a Geometry. More...
 

Additional Inherited Members

- Protected Member Functions inherited from geos::geom::prep::PreparedPolygonPredicate
geom::Location getOutermostTestComponentLocation (const geom::Geometry *testGeom) const
 Returns the outermost Location among a test point from each components of the test geometry. More...
 
bool isAllTestComponentsInTargetInterior (const geom::Geometry *testGeom) const
 Tests whether all components of the test Geometry are contained in the interior of the target geometry. More...
 
bool isAnyTestComponentInTarget (const geom::Geometry *testGeom) const
 Tests whether any component of the test Geometry intersects the area of the target geometry. More...
 
bool isAnyTestComponentInTargetInterior (const geom::Geometry *testGeom) const
 Tests whether any component of the test Geometry intersects the interior of the target geometry. More...
 
bool isAnyTargetComponentInAreaTest (const geom::Geometry *testGeom, const std::vector< const geom::CoordinateXY * > *targetRepPts) const
 
- Protected Attributes inherited from geos::geom::prep::PreparedPolygonPredicate
const PreparedPolygon *const prepPoly
 

Detailed Description

Computes the containsProperly spatial relationship predicate for PreparedPolygons relative to all other Geometry classes.

Uses short-circuit tests and indexing to improve performance.

A Geometry A containsProperly another Geometry B iff all points of B are contained in the Interior of A. Equivalently, B is contained in A AND B does not intersect the Boundary of A.

The advantage to using this predicate is that it can be computed efficiently, with no need to compute topology at individual points. In a situation with many geometries intersecting the boundary of the target geometry, this can make a performance difference.

Author
Martin Davis

Constructor & Destructor Documentation

◆ PreparedPolygonContainsProperly()

geos::geom::prep::PreparedPolygonContainsProperly::PreparedPolygonContainsProperly ( const PreparedPolygon *const  prep)
inline

Creates an instance of this operation.

Parameters
prepthe PreparedPolygon to evaluate

Member Function Documentation

◆ containsProperly() [1/2]

bool geos::geom::prep::PreparedPolygonContainsProperly::containsProperly ( const geom::Geometry geom)

Tests whether this PreparedPolygon containsProperly a given geometry.

Parameters
geomthe test geometry
Returns
true if the test geometry is contained properly

◆ containsProperly() [2/2]

static bool geos::geom::prep::PreparedPolygonContainsProperly::containsProperly ( const PreparedPolygon *const  prep,
const geom::Geometry geom 
)
inlinestatic

Computes the containsProperly predicate between a PreparedPolygon and a Geometry.

Parameters
prepthe prepared polygon
geoma test geometry
Returns
true if the polygon properly contains the geometry

References containsProperly().

Referenced by containsProperly().


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