Class RelateOp

Hierarchy: Object , GeometryGraphOperation, RelateOp
public class RelateOp
extends GeometryGraphOperation
Implements the SFS relate() generalized spatial predicate on two Geometrys.

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.

Other

  • version: 1.7
public RelateOp(Geometry g0, Geometry g1)
Creates a new Relate operation, using the default (OGC SFS) Boundary Node Rule.
Parameters:
g0 - g0 a Geometry to relate
g1 - g1 another Geometry to relate
public RelateOp(Geometry g0, Geometry g1, BoundaryNodeRule boundaryNodeRule)
Creates a new Relate operation with a specified Boundary Node Rule.
Parameters:
g0 - g0 a Geometry to relate
g1 - g1 another Geometry to relate
boundaryNodeRule - boundaryNodeRule the Boundary Node Rule to use
public static IntersectionMatrix relate(Geometry a, Geometry b)
Computes the IntersectionMatrix for the spatial relationship between two Geometrys, using the default (OGC SFS) Boundary Node Rule
Parameters:
a - a a Geometry to test
b - b a Geometry to test
Returns:
the IntersectionMatrix for the spatial relationship between the geometries
public static IntersectionMatrix relate(Geometry a, Geometry b, BoundaryNodeRule boundaryNodeRule)
Computes the IntersectionMatrix for the spatial relationship between two Geometrys using a specified Boundary Node Rule.
Parameters:
a - a a Geometry to test
b - b a Geometry to test
boundaryNodeRule - boundaryNodeRule the Boundary Node Rule to use
Returns:
the IntersectionMatrix for the spatial relationship between the input geometries
public IntersectionMatrix getIntersectionMatrix()
Gets the IntersectionMatrix for the spatial relationship between the input geometries.
Returns:
the IntersectionMatrix for the spatial relationship between the input geometries