GEOS 3.13.1
geos::geom::prep::PreparedPolygonCovers Class Reference

Computes the covers spatial relationship predicate for a PreparedPolygon relative to all other Geometry classes. More...

#include <PreparedPolygonCovers.h>

Inheritance diagram for geos::geom::prep::PreparedPolygonCovers:
geos::geom::prep::AbstractPreparedPolygonContains geos::geom::prep::PreparedPolygonPredicate

Public Member Functions

 PreparedPolygonCovers (const PreparedPolygon *const prep)
 Creates an instance of this operation.
bool covers (const Geometry *geom)
 Tests whether this PreparedPolygon covers a given geometry.
Public Member Functions inherited from geos::geom::prep::AbstractPreparedPolygonContains
 AbstractPreparedPolygonContains (const PreparedPolygon *const p_prepPoly)
 AbstractPreparedPolygonContains (const PreparedPolygon *const p_prepPoly, bool p_requireSomePointInInterior)
Public Member Functions inherited from geos::geom::prep::PreparedPolygonPredicate
 PreparedPolygonPredicate (const PreparedPolygon *const p_prepPoly)
 Creates an instance of this operation.

Static Public Member Functions

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

Protected Member Functions

bool fullTopologicalPredicate (const geom::Geometry *geom) override
Protected Member Functions inherited from geos::geom::prep::AbstractPreparedPolygonContains
bool eval (const geom::Geometry *geom)
bool evalPointTestGeom (const geom::Geometry *geom, geom::Location outermostLoc)
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.
bool isAllTestComponentsInTargetInterior (const geom::Geometry *testGeom) const
 Tests whether all components of the test Geometry are contained in the interior of the target geometry.
bool isAnyTestComponentInTarget (const geom::Geometry *testGeom) const
 Tests whether any component of the test Geometry intersects the area of the target geometry.
bool isAnyTestComponentInTargetInterior (const geom::Geometry *testGeom) const
 Tests whether any component of the test Geometry intersects the interior of the target geometry.
bool isAnyTargetComponentInAreaTest (const geom::Geometry *testGeom, const std::vector< const geom::CoordinateXY * > *targetRepPts) const

Additional Inherited Members

Protected Attributes inherited from geos::geom::prep::AbstractPreparedPolygonContains
bool requireSomePointInInterior
Protected Attributes inherited from geos::geom::prep::PreparedPolygonPredicate
const PreparedPolygon *const prepPoly

Detailed Description

Computes the covers spatial relationship predicate for a PreparedPolygon relative to all other Geometry classes.

Uses short-circuit tests and indexing to improve performance.

It is not possible to short-circuit in all cases, in particular in the case where the test geometry touches the polygon linework. In this case full topology must be computed.

Author
Martin Davis

Constructor & Destructor Documentation

◆ PreparedPolygonCovers()

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

Creates an instance of this operation.

Parameters
prepthe PreparedPolygon to evaluate

Referenced by covers().

Member Function Documentation

◆ covers() [1/2]

bool geos::geom::prep::PreparedPolygonCovers::covers ( const Geometry * geom)
inline

Tests whether this PreparedPolygon covers a given geometry.

Parameters
geomthe test geometry
Returns
true if the test geometry is covered

References geos::geom::prep::AbstractPreparedPolygonContains::eval().

◆ covers() [2/2]

bool geos::geom::prep::PreparedPolygonCovers::covers ( const PreparedPolygon *const prep,
const geom::Geometry * geom )
inlinestatic

Computes the covers predicate between a PreparedPolygon and a Geometry.

Parameters
prepthe prepared polygon
geoma test geometry
Returns
true if the polygon covers the geometry

References covers(), and PreparedPolygonCovers().

Referenced by covers().

◆ fullTopologicalPredicate()

bool geos::geom::prep::PreparedPolygonCovers::fullTopologicalPredicate ( const geom::Geometry * geom)
overrideprotectedvirtual

Computes the full topological covers predicate. Used when short-circuit tests are not conclusive.

Parameters
geomthe test geometry
Returns
true if this prepared polygon covers the test geometry

Implements geos::geom::prep::AbstractPreparedPolygonContains.


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