Skip navigation links
org.locationtech.jts:jts-core 1.19.0

Package org.locationtech.jts.operation.relate

Contains classes to implement the computation of the spatial relationships of Geometrys.

See: Description

Package org.locationtech.jts.operation.relate Description

Contains classes to implement the computation of the spatial relationships of Geometrys.

The relate algorithm computes the IntersectionMatrix describing the relationship of two Geometrys. The algorithm for computing relate uses the intersection operations supported by topology graphs. Although the relate result depends on the resultant graph formed by the computed intersections, there is no need to explicitly compute the entire graph. It is sufficient to compute the local structure of the graph at each intersection node.

The algorithm to compute relate has the following steps:

Labeling isolated components

Isolated components are components (edges or nodes) of an input Geometry which do not contain any intersections with the other input Geometry. The topological relationship of these components to the other input Geometry must be computed in order to determine the complete labeling of the component. This can be done by testing whether the component lies in the interior or exterior of the other Geometry. If the other Geometry is 1-dimensional, the isolated component must lie in the exterior (since otherwise it would have an intersection with an edge of the Geometry). If the other Geometry is 2-dimensional, a Point-In-Polygon test can be used to determine whether the isolated component is in the interior or exterior.

Package Specification

Skip navigation links
org.locationtech.jts:jts-core 1.19.0

Copyright © 2022. All rights reserved.