GEOS 3.14.0dev
Public Member Functions | Protected Member Functions | List of all members
geos::geom::prep::BasicPreparedGeometry Class Reference

A base class for PreparedGeometry subclasses. More...

#include <BasicPreparedGeometry.h>

Inheritance diagram for geos::geom::prep::BasicPreparedGeometry:
geos::geom::prep::PreparedGeometry geos::geom::prep::PreparedLineString geos::geom::prep::PreparedPoint geos::geom::prep::PreparedPolygon

Public Member Functions

 BasicPreparedGeometry (const Geometry *geom)
 
const geom::GeometrygetGeometry () const override
 Gets the original Geometry which has been prepared.
 
const std::vector< const CoordinateXY * > * getRepresentativePoints () const
 
bool isAnyTargetComponentInTest (const geom::Geometry *testGeom) const
 
bool within (const geom::Geometry *g) const override
 
bool contains (const geom::Geometry *g) const override
 
bool containsProperly (const geom::Geometry *g) const override
 
bool coveredBy (const geom::Geometry *g) const override
 
bool covers (const geom::Geometry *g) const override
 
bool crosses (const geom::Geometry *g) const override
 
bool disjoint (const geom::Geometry *g) const override
 
bool intersects (const geom::Geometry *g) const override
 
bool overlaps (const geom::Geometry *g) const override
 
bool touches (const geom::Geometry *g) const override
 
std::unique_ptr< IntersectionMatrixrelate (const geom::Geometry *g) const override
 
bool relate (const geom::Geometry *g, const std::string &pat) const override
 
std::unique_ptr< geom::CoordinateSequencenearestPoints (const geom::Geometry *g) const override
 
double distance (const geom::Geometry *g) const override
 
bool isWithinDistance (const geom::Geometry *geom, double dist) const override
 
std::string toString ()
 

Protected Member Functions

void setGeometry (const geom::Geometry *geom)
 
bool envelopesIntersect (const geom::Geometry *g) const
 
bool envelopeCovers (const geom::Geometry *g) const
 

Detailed Description

A base class for PreparedGeometry subclasses.

Contains default implementations for methods, which simply delegate to the equivalent Geometry methods. This class may be used as a "no-op" class for Geometry types which do not have a corresponding PreparedGeometry implementation.

Author
Martin Davis

Member Function Documentation

◆ contains()

bool geos::geom::prep::BasicPreparedGeometry::contains ( const geom::Geometry g) const
overridevirtual

Default implementation.

Implements geos::geom::prep::PreparedGeometry.

Reimplemented in geos::geom::prep::PreparedPolygon.

◆ containsProperly()

bool geos::geom::prep::BasicPreparedGeometry::containsProperly ( const geom::Geometry g) const
overridevirtual

Default implementation.

Implements geos::geom::prep::PreparedGeometry.

Reimplemented in geos::geom::prep::PreparedPolygon.

◆ coveredBy()

bool geos::geom::prep::BasicPreparedGeometry::coveredBy ( const geom::Geometry g) const
overridevirtual

Default implementation.

Implements geos::geom::prep::PreparedGeometry.

◆ covers()

bool geos::geom::prep::BasicPreparedGeometry::covers ( const geom::Geometry g) const
overridevirtual

Default implementation.

Implements geos::geom::prep::PreparedGeometry.

Reimplemented in geos::geom::prep::PreparedPolygon.

◆ crosses()

bool geos::geom::prep::BasicPreparedGeometry::crosses ( const geom::Geometry g) const
overridevirtual

Default implementation.

Implements geos::geom::prep::PreparedGeometry.

◆ disjoint()

bool geos::geom::prep::BasicPreparedGeometry::disjoint ( const geom::Geometry g) const
overridevirtual

Standard implementation for all geometries. Supports GeometryCollections as input.

Implements geos::geom::prep::PreparedGeometry.

◆ distance()

double geos::geom::prep::BasicPreparedGeometry::distance ( const geom::Geometry g) const
overridevirtual

◆ envelopeCovers()

bool geos::geom::prep::BasicPreparedGeometry::envelopeCovers ( const geom::Geometry g) const
protected

Determines whether the envelope of this geometry covers the Geometry g.

Parameters
ga Geometry
Returns
true if g is contained in this envelope

◆ envelopesIntersect()

bool geos::geom::prep::BasicPreparedGeometry::envelopesIntersect ( const geom::Geometry g) const
protected

Determines whether a Geometry g interacts with this geometry by testing the geometry envelopes.

Parameters
ga Geometry
Returns
true if the envelopes intersect

◆ getGeometry()

const geom::Geometry & geos::geom::prep::BasicPreparedGeometry::getGeometry ( ) const
inlineoverridevirtual

Gets the original Geometry which has been prepared.

Returns
the base geometry

Implements geos::geom::prep::PreparedGeometry.

◆ getRepresentativePoints()

const std::vector< const CoordinateXY * > * geos::geom::prep::BasicPreparedGeometry::getRepresentativePoints ( ) const
inline

Gets the list of representative points for this geometry. One vertex is included for every component of the geometry (i.e. including one for every ring of polygonal geometries)

Returns
a List of Coordinate

◆ intersects()

bool geos::geom::prep::BasicPreparedGeometry::intersects ( const geom::Geometry g) const
overridevirtual

◆ isAnyTargetComponentInTest()

bool geos::geom::prep::BasicPreparedGeometry::isAnyTargetComponentInTest ( const geom::Geometry testGeom) const

Tests whether any representative of the target geometry intersects the test geometry. This is useful in A/A, A/L, A/P, L/P, and P/P cases.

Parameters
testGeomthe test geometry
Returns
true if any component intersects the areal test geometry

◆ isWithinDistance()

bool geos::geom::prep::BasicPreparedGeometry::isWithinDistance ( const geom::Geometry geom,
double  dist 
) const
overridevirtual

◆ nearestPoints()

std::unique_ptr< geom::CoordinateSequence > geos::geom::prep::BasicPreparedGeometry::nearestPoints ( const geom::Geometry g) const
overridevirtual

Default implementation.

Implements geos::geom::prep::PreparedGeometry.

Reimplemented in geos::geom::prep::PreparedLineString.

◆ overlaps()

bool geos::geom::prep::BasicPreparedGeometry::overlaps ( const geom::Geometry g) const
overridevirtual

Default implementation.

Implements geos::geom::prep::PreparedGeometry.

◆ relate() [1/2]

std::unique_ptr< IntersectionMatrix > geos::geom::prep::BasicPreparedGeometry::relate ( const geom::Geometry g) const
overridevirtual

Default implementation.

Implements geos::geom::prep::PreparedGeometry.

◆ relate() [2/2]

bool geos::geom::prep::BasicPreparedGeometry::relate ( const geom::Geometry g,
const std::string &  pat 
) const
overridevirtual

Default implementation.

Implements geos::geom::prep::PreparedGeometry.

◆ setGeometry()

void geos::geom::prep::BasicPreparedGeometry::setGeometry ( const geom::Geometry geom)
protected

Sets the original Geometry which will be prepared.

◆ touches()

bool geos::geom::prep::BasicPreparedGeometry::touches ( const geom::Geometry g) const
overridevirtual

Default implementation.

Implements geos::geom::prep::PreparedGeometry.

◆ within()

bool geos::geom::prep::BasicPreparedGeometry::within ( const geom::Geometry g) const
overridevirtual

Default implementation.

Implements geos::geom::prep::PreparedGeometry.


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