GEOS  3.14.0dev
Public Member Functions | Static Public Member Functions | List of all members
geos::operation::relateng::RelateNG Class Reference

#include <RelateNG.h>

Public Member Functions

std::unique_ptr< IntersectionMatrixevaluate (const Geometry *b)
 
bool evaluate (const Geometry *b, const std::string &imPattern)
 
bool evaluate (const Geometry *b, TopologyPredicate &predicate)
 
bool intersects (const Geometry *a)
 
bool crosses (const Geometry *a)
 
bool disjoint (const Geometry *a)
 
bool touches (const Geometry *a)
 
bool within (const Geometry *a)
 
bool contains (const Geometry *a)
 
bool overlaps (const Geometry *a)
 
bool covers (const Geometry *a)
 
bool coveredBy (const Geometry *a)
 
bool equalsTopo (const Geometry *a)
 
bool relate (const Geometry *a, const std::string &pat)
 
std::unique_ptr< IntersectionMatrixrelate (const Geometry *a)
 

Static Public Member Functions

static bool relate (const Geometry *a, const Geometry *b, TopologyPredicate &pred)
 
static bool relate (const Geometry *a, const Geometry *b, TopologyPredicate &pred, const BoundaryNodeRule &bnRule)
 
static bool relate (const Geometry *a, const Geometry *b, const std::string &imPattern)
 
static std::unique_ptr< IntersectionMatrixrelate (const Geometry *a, const Geometry *b)
 
static std::unique_ptr< IntersectionMatrixrelate (const Geometry *a, const Geometry *b, const BoundaryNodeRule &bnRule)
 
static std::unique_ptr< RelateNGprepare (const Geometry *a)
 
static std::unique_ptr< RelateNGprepare (const Geometry *a, const BoundaryNodeRule &bnRule)
 
static bool intersects (const Geometry *a, const Geometry *b)
 
static bool crosses (const Geometry *a, const Geometry *b)
 
static bool disjoint (const Geometry *a, const Geometry *b)
 
static bool touches (const Geometry *a, const Geometry *b)
 
static bool within (const Geometry *a, const Geometry *b)
 
static bool contains (const Geometry *a, const Geometry *b)
 
static bool overlaps (const Geometry *a, const Geometry *b)
 
static bool covers (const Geometry *a, const Geometry *b)
 
static bool coveredBy (const Geometry *a, const Geometry *b)
 
static bool equalsTopo (const Geometry *a, const Geometry *b)
 

Detailed Description

Computes the value of topological predicates between two geometries based on the Dimensionally-Extended 9-Intersection Model https://en.wikipedia.org/wiki/DE-9IM (DE-9IM). Standard and custom topological predicates are provided by RelatePredicate.

The RelateNG algorithm has the following capabilities:

See IntersectionMatrixPattern for a description of DE-9IM patterns.

If not specified, the standard BoundaryNodeRule::MOD2_BOUNDARY_RULE is used.

RelateNG operates in 2D only; it ignores any Z ordinates.

This implementation replaces RelateOp and PreparedGeometry.

FUTURE WORK

Author
Martin Davis
See also
RelateOp
PreparedGeometry

Member Function Documentation

◆ evaluate() [1/3]

std::unique_ptr<IntersectionMatrix> geos::operation::relateng::RelateNG::evaluate ( const Geometry b)

Computes the DE-9IM matrix for the topological relationship to a geometry.

Parameters
bthe B geometry to test against
Returns
the DE-9IM matrix

◆ evaluate() [2/3]

bool geos::operation::relateng::RelateNG::evaluate ( const Geometry b,
const std::string &  imPattern 
)

Tests whether the topological relationship to a geometry matches a DE-9IM matrix pattern.

Parameters
bthe B geometry to test against
imPatternthe DE-9IM pattern to match
Returns
true if the geometries' topological relationship matches the DE-9IM pattern
See also
IntersectionMatrixPattern

◆ evaluate() [3/3]

bool geos::operation::relateng::RelateNG::evaluate ( const Geometry b,
TopologyPredicate &  predicate 
)

Tests whether the topological relationship to a geometry satisfies a topology predicate.

Parameters
bthe B geometry to test against
predicatethe topological predicate
Returns
true if the predicate is satisfied

◆ prepare() [1/2]

static std::unique_ptr<RelateNG> geos::operation::relateng::RelateNG::prepare ( const Geometry a)
static

Creates a prepared RelateNG instance to optimize the evaluation of relationships against a single geometry.

Parameters
athe A input geometry
Returns
a prepared instance

◆ prepare() [2/2]

static std::unique_ptr<RelateNG> geos::operation::relateng::RelateNG::prepare ( const Geometry a,
const BoundaryNodeRule bnRule 
)
static

Creates a prepared RelateNG instance to optimize the computation of predicates against a single geometry, using a given BoundaryNodeRule.

Parameters
athe A input geometry
bnRulethe required BoundaryNodeRule
Returns
a prepared instance

◆ relate() [1/5]

static std::unique_ptr<IntersectionMatrix> geos::operation::relateng::RelateNG::relate ( const Geometry a,
const Geometry b 
)
static

Computes the DE-9IM matrix for the topological relationship between two geometries.

Parameters
athe A input geometry
bthe B input geometry
Returns
the DE-9IM matrix for the topological relationship

◆ relate() [2/5]

static std::unique_ptr<IntersectionMatrix> geos::operation::relateng::RelateNG::relate ( const Geometry a,
const Geometry b,
const BoundaryNodeRule bnRule 
)
static

Computes the DE-9IM matrix for the topological relationship between two geometries.

Parameters
athe A input geometry
bthe B input geometry
bnRulethe Boundary Node Rule to use
Returns
the DE-9IM matrix for the relationship

◆ relate() [3/5]

static bool geos::operation::relateng::RelateNG::relate ( const Geometry a,
const Geometry b,
const std::string &  imPattern 
)
static

Tests whether the topological relationship to a geometry matches a DE-9IM matrix pattern.

Parameters
athe A input geometry
bthe B input geometry
imPatternthe DE-9IM pattern to match
Returns
true if the geometries relationship matches the DE-9IM pattern
See also
IntersectionMatrixPattern

◆ relate() [4/5]

static bool geos::operation::relateng::RelateNG::relate ( const Geometry a,
const Geometry b,
TopologyPredicate &  pred 
)
static

Tests whether the topological relationship between two geometries satisfies a topological predicate.

Parameters
athe A input geometry
bthe B input geometry
predthe topological predicate
Returns
true if the topological relationship is satisfied

◆ relate() [5/5]

static bool geos::operation::relateng::RelateNG::relate ( const Geometry a,
const Geometry b,
TopologyPredicate &  pred,
const BoundaryNodeRule bnRule 
)
static

Tests whether the topological relationship between two geometries satisfies a topological predicate, using a given BoundaryNodeRule.

Parameters
athe A input geometry
bthe B input geometry
predthe topological predicate
bnRulethe Boundary Node Rule to use
Returns
true if the topological relationship is satisfied

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