|
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< IntersectionMatrix > | relate (const Geometry *a, const Geometry *b) |
|
static std::unique_ptr< IntersectionMatrix > | relate (const Geometry *a, const Geometry *b, const BoundaryNodeRule &bnRule) |
|
static std::unique_ptr< RelateNG > | prepare (const Geometry *a) |
|
static std::unique_ptr< RelateNG > | prepare (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) |
|
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:
- Efficient short-circuited evaluation of topological predicates (including matching custom DE-9IM matrix patterns)
- Optimized repeated evaluation of predicates against a single geometry via cached spatial indexes (AKA "prepared mode")
- Robust computation (only point-local topology is required, so invalid geometry topology does not cause failures)
- GeometryCollection inputs containing mixed types and overlapping polygons are supported, using union semantics.
- Zero-length LineStrings are treated as being topologically identical to Points.
- Support for BoundaryNodeRule.
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
- Support for a distance tolerance to provide "approximate" predicate evaluation
- Author
- Martin Davis
- See also
- RelateOp
-
PreparedGeometry