public class RelateNG extends Object
RelatePredicate.
The RelateNG algorithm has the following capabilities:
GeometryCollection inputs containing mixed types and overlapping polygons
are supported, using union semantics.
BoundaryNodeRules.
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.
RelateOp,
PreparedGeometry| Modifier and Type | Method and Description |
|---|---|
IntersectionMatrix |
evaluate(Geometry b)
Computes the DE-9IM matrix for the topological relationship to a geometry.
|
boolean |
evaluate(Geometry b,
String imPattern)
Tests whether the topological relationship to a geometry
matches a DE-9IM matrix pattern.
|
boolean |
evaluate(Geometry b,
TopologyPredicate predicate)
Tests whether the topological relationship to a geometry
satisfies a topology predicate.
|
static RelateNG |
prepare(Geometry a)
Creates a prepared RelateNG instance to optimize the
evaluation of relationships against a single geometry.
|
static RelateNG |
prepare(Geometry a,
BoundaryNodeRule bnRule)
Creates a prepared RelateNG instance to optimize the
computation of predicates against a single geometry,
using a given
BoundaryNodeRule. |
static IntersectionMatrix |
relate(Geometry a,
Geometry b)
Computes the DE-9IM matrix
for the topological relationship between two geometries.
|
static IntersectionMatrix |
relate(Geometry a,
Geometry b,
BoundaryNodeRule bnRule)
Computes the DE-9IM matrix
for the topological relationship between two geometries.
|
static boolean |
relate(Geometry a,
Geometry b,
String imPattern)
Tests whether the topological relationship to a geometry
matches a DE-9IM matrix pattern.
|
static boolean |
relate(Geometry a,
Geometry b,
TopologyPredicate pred)
Tests whether the topological relationship between two geometries
satisfies a topological predicate.
|
static boolean |
relate(Geometry a,
Geometry b,
TopologyPredicate pred,
BoundaryNodeRule bnRule)
Tests whether the topological relationship between two geometries
satisfies a topological predicate,
using a given
BoundaryNodeRule. |
public static boolean relate(Geometry a, Geometry b, TopologyPredicate pred)
a - the A input geometryb - the A input geometrypred - the topological predicatepublic static boolean relate(Geometry a, Geometry b, TopologyPredicate pred, BoundaryNodeRule bnRule)
BoundaryNodeRule.a - the A input geometryb - the A input geometrypred - the topological predicatebnRule - the Boundary Node Rule to usepublic static boolean relate(Geometry a, Geometry b, String imPattern)
a - the A input geometryb - the A input geometryimPattern - the DE-9IM pattern to matchIntersectionMatrixPatternpublic static IntersectionMatrix relate(Geometry a, Geometry b)
a - the A input geometryb - the A input geometrypublic static IntersectionMatrix relate(Geometry a, Geometry b, BoundaryNodeRule bnRule)
a - the A input geometryb - the A input geometrybnRule - the Boundary Node Rule to usepublic static RelateNG prepare(Geometry a)
a - the A input geometrypublic static RelateNG prepare(Geometry a, BoundaryNodeRule bnRule)
BoundaryNodeRule.a - the A input geometrybnRule - the required BoundaryNodeRulepublic IntersectionMatrix evaluate(Geometry b)
b - the B geometry to test againstpublic boolean evaluate(Geometry b, String imPattern)
b - the B geometry to test againstimPattern - the DE-9IM pattern to matchIntersectionMatrixPatternpublic boolean evaluate(Geometry b, TopologyPredicate predicate)
b - the B geometry to test againstpredicate - the topological predicateCopyright © 2024. All rights reserved.