Class RelateOp
java.lang.Object
org.locationtech.jts.operation.GeometryGraphOperation
org.locationtech.jts.operation.relate.RelateOp
Implements the SFS relate() generalized spatial predicate on two
Geometry
s.
The class supports specifying a custom BoundaryNodeRule
to be used during the relate computation.
If named spatial predicates are used on the result IntersectionMatrix
of the RelateOp, the result may or not be affected by the
choice of BoundaryNodeRule, depending on the exact nature of the pattern.
For instance, IntersectionMatrix.isIntersects()
is insensitive
to the choice of BoundaryNodeRule,
whereas IntersectionMatrix.isTouches(int, int)
is affected by the rule chosen.
Note: custom Boundary Node Rules do not (currently)
affect the results of other Geometry
methods (such
as Geometry.getBoundary()
. The results of
these methods may not be consistent with the relationship computed by
a custom Boundary Node Rule.
- Version:
- 1.7
-
Field Summary
Fields inherited from class org.locationtech.jts.operation.GeometryGraphOperation
arg, li, resultPrecisionModel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the IntersectionMatrix for the spatial relationship between the input geometries.static IntersectionMatrix
Computes theIntersectionMatrix
for the spatial relationship between twoGeometry
s, using the default (OGC SFS) Boundary Node Rulestatic IntersectionMatrix
relate
(Geometry a, Geometry b, BoundaryNodeRule boundaryNodeRule) Computes theIntersectionMatrix
for the spatial relationship between twoGeometry
s using a specified Boundary Node Rule.Methods inherited from class org.locationtech.jts.operation.GeometryGraphOperation
getArgGeometry, setComputationPrecision
-
Constructor Details
-
RelateOp
Creates a new Relate operation, using the default (OGC SFS) Boundary Node Rule.- Parameters:
g0
- a Geometry to relateg1
- another Geometry to relate
-
RelateOp
Creates a new Relate operation with a specified Boundary Node Rule.- Parameters:
g0
- a Geometry to relateg1
- another Geometry to relateboundaryNodeRule
- the Boundary Node Rule to use
-
-
Method Details
-
relate
Computes theIntersectionMatrix
for the spatial relationship between twoGeometry
s, using the default (OGC SFS) Boundary Node Rule- Parameters:
a
- a Geometry to testb
- a Geometry to test- Returns:
- the IntersectionMatrix for the spatial relationship between the geometries
-
relate
Computes theIntersectionMatrix
for the spatial relationship between twoGeometry
s using a specified Boundary Node Rule.- Parameters:
a
- a Geometry to testb
- a Geometry to testboundaryNodeRule
- the Boundary Node Rule to use- Returns:
- the IntersectionMatrix for the spatial relationship between the input geometries
-
getIntersectionMatrix
Gets the IntersectionMatrix for the spatial relationship between the input geometries.- Returns:
- the IntersectionMatrix for the spatial relationship between the input geometries
-