DE-9IM matrices are 3x3 matrices with integer entries. The matrix indices {0,1,2} represent the topological locations that occur in a geometry (Interior, Boundary, Exterior). These are provided by the constants Location.INTERIOR , Location.BOUNDARY , and Location.EXTERIOR .
When used to specify the topological relationship between two geometries, the matrix entries represent the possible dimensions of each intersection: Dimension.A = 2, Dimension.L = 1, Dimension.P = 0 and Dimension.FALSE = -1. When used to represent a matrix pattern entries can have the additional values Dimension.TRUE {"T") and Dimension.DONTCARE ("*").
For a description of the DE-9IM and the spatial predicates derived from it, see the following references:
Methods are provided to:
IntersectionMatrix with the given dimension symbols.
IntersectionMatrix with the same elements as
other.
IntersectionMatrix to copy
IntersectionMatrix . Possible values are
{TRUE, FALSE, DONTCARE, 0, 1, 2}.
IntersectionMatrix . Possible values are
{TRUE, FALSE, DONTCARE, 0, 1, 2}.
IntersectionMatrix. Possible values are
{T, F, * , 0, 1, 2}.
{T, F, * , 0, 1, 2}.
{T, F, * , 0, 1, 2}.
IntersectionMatrixs elements.
IntersectionMatrix, indicating the interior, boundary or exterior of the first
Geometry
IntersectionMatrix, indicating the interior, boundary or exterior of the second
Geometry
IntersectionMatrix to the dimension symbols in
dimensionSymbols.
IntersectionMatrix s elements. Possible values are
{T, F, * , 0, 1, 2}
minimumDimensionValue if the element is less.
IntersectionMatrix , indicating the interior, boundary or exterior of the first
Geometry
IntersectionMatrix , indicating the interior, boundary or exterior of the second
Geometry
{DONTCARE, TRUE, FALSE, 0, 1, 2}.
minimumDimensionValue if the element is less. Does nothing if row <0 or column < 0.
IntersectionMatrix , indicating the interior, boundary or exterior of the first
Geometry
IntersectionMatrix , indicating the interior, boundary or exterior of the second
Geometry
{DONTCARE, TRUE, FALSE, 0, 1, 2}.
IntersectionMatrix, changes the element to the corresponding minimum dimension symbol if the element is less.
IntersectionMatrix. The order of dimension values from least to greatest is
{DONTCARE, TRUE, FALSE, 0, 1, 2} .
IntersectionMatrix to
dimensionValue .
IntersectionMatrix s elements. Possible values
{TRUE, FALSE, DONTCARE, 0, 1, 2} .
IntersectionMatrix, indicating the interior, boundary or exterior of the first
Geometry
IntersectionMatrix, indicating the interior, boundary or exterior of the second
Geometry
[FF*FF****].
true if the two
Geometrys related by this matrix are disjoint
isDisjoint returns false.
true if the two
Geometrys related by this matrix intersect
[FT*******],
[F**T*****] or
[F***T****].
Geometry
Geometry
true if the two
Geometry s related by this matrix touch; Returns false if both
Geometrys are points.
The crosses predicate has the following equivalent definitions:
[T*T******] (for P/L, P/A, and L/A situations) [T*****T**] (for L/P, L/A, and A/L situations) [0********] (for L/L situations) false.
The SFS defined this predicate only for P/L, P/A, L/L, and L/A situations. JTS extends the definition to apply to L/P, A/P and A/L situations as well. This makes the relation symmetric.
Geometry
Geometry
true if the two
Geometrys related by this matrix cross.
[T*F**F***].
true if the first
Geometry is within the second
true if the first
Geometry contains the second
[T*****FF*] or
[*T****FF*] or
[***T**FF*] or
[****T*FF*]
true if the first
Geometry covers the second
[T*F**F***] or
[*TF**F***] or
[**FT*F***] or
[**F*TF***]
true if the first
Geometry is covered by the second
Note: This pattern differs from the one stated in Simple feature access - Part 1: Common architecture. That document states the pattern as [TFFFTFFFT]. This would specify that two identical POINTs are not equal, which is not desirable behaviour. The pattern used here has been corrected to compute equality in this situation.
Geometry
Geometry
true if the two
Geometrys related by this matrix are equal; the
Geometrys must have the same dimension to be equal
Geometry
Geometry
true if the two
Geometrys related by this matrix overlap. For this function to return
true, the
Geometrys must be two points, two curves or two surfaces.
{T, F, * , 0, 1, 2}.
true if this matrix matches the pattern
IntersectionMatrix as a convenience
String representation of this
IntersectionMatrix .
IntersectionMatrix in row-major order.