IntersectionMatrix class

Models a Dimensionally Extended Nine-Intersection Model (DE-9IM) matrix. DE-9IM matrices (such as "212FF1FF2") specify the topological relationship between two {@link Geometry}s. This class can also represent matrix patterns (such as "TT*****") which are used for matching instances of DE-9IM matrices.

Methods are provided to:

  • set and query the elements of the matrix in a convenient fashion
  • convert to and from the standard string representation (specified in SFS Section 2.1.13.2).
  • test to see if a matrix matches a given pattern string.

For a description of the DE-9IM and the spatial predicates derived from it, see the OGC 99-049 OpenGIS Simple Features Specification for SQL, as well as OGC 06-103r4 OpenGIS Implementation Standard for Geographic information - Simple feature access - Part 1: Common architecture (which provides some further details on certain predicate specifications).

The entries of the matrix are defined by the constants in the {@link Dimension} class. The indices of the matrix represent the topological locations that occur in a geometry (Interior, Boundary, Exterior). These are provided as constants in the {@link Location} class.

@version 1.7

Constructors

IntersectionMatrix()
Creates an IntersectionMatrix with FALSE dimension values.
IntersectionMatrix.fromDimensionSymbols(String elements)
Creates an IntersectionMatrix with the given dimension symbols.
IntersectionMatrix.fromMatrix(IntersectionMatrix other)
Creates an IntersectionMatrix with the same elements as other.

Properties

hashCode int
The hash code for this object.
no setterinherited
matrix List<List<int>>
Internal representation of this IntersectionMatrix.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(IntersectionMatrix im) → void
Adds one matrix to another. Addition is defined by taking the maximum dimension value of each position in the summand matrices.
get(int row, int column) int
Returns the value of one of this matrix entries. The value of the provided index is one of the values from the {@link Location} class. The value returned is a constant from the {@link Dimension} class.
isContains() bool
Tests whether this IntersectionMatrix is T*****FF*.
isCoveredBy() bool
Returns true if this IntersectionMatrix is TFF or TFF or **FTF** or FTF
isCovers() bool
Returns true if this IntersectionMatrix is T***FF* or TFF or TFF or **TFF
isCrosses(int dimensionOfGeometryA, int dimensionOfGeometryB) bool
Tests whether this geometry crosses the specified geometry.
isDisjoint() bool
Returns true if this IntersectionMatrix is FFFF***.
isEquals(int dimensionOfGeometryA, int dimensionOfGeometryB) bool
Tests whether the argument dimensions are equal and this IntersectionMatrix matches the pattern TF**FFF.
isIntersects() bool
Returns true if isDisjoint returns false.
isOverlaps(int dimensionOfGeometryA, int dimensionOfGeometryB) bool
Returns true if this IntersectionMatrix is
isTouches(int dimensionOfGeometryA, int dimensionOfGeometryB) bool
Returns true if this IntersectionMatrix is FT*******, FT*** or F*T**.
isWithin() bool
Tests whether this IntersectionMatrix is TFF.
matches(String requiredDimensionSymbols) bool
Returns whether the elements of this IntersectionMatrix satisfies the required dimension symbols.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set(int row, int column, int dimensionValue) → void
Changes the value of one of this IntersectionMatrixs elements.
setAll(int dimensionValue) → void
Changes the elements of this IntersectionMatrix to dimensionValue .
setAtLeast(int row, int column, int minimumDimensionValue) → void
Changes the specified element to minimumDimensionValue if the element is less.
setAtLeastDimensionSymbols(String minimumDimensionSymbols) → void
For each element in this IntersectionMatrix, changes the element to the corresponding minimum dimension symbol if the element is less.
setAtLeastIfValid(int row, int column, int minimumDimensionValue) → void
If row >= 0 and column >= 0, changes the specified element to minimumDimensionValue if the element is less. Does nothing if row <0 or column < 0.
setDimensionSimbols(String dimensionSymbols) → void
Changes the elements of this IntersectionMatrix to the dimension symbols in dimensionSymbols.
toString() String
Returns a nine-character String representation of this IntersectionMatrix .
override
transpose() IntersectionMatrix
Transposes this IntersectionMatrix.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

isTrue(int actualDimensionValue) bool
Tests if the dimension value matches TRUE (i.e. has value 0, 1, 2 or TRUE).
matchesDimSymbols(String actualDimensionSymbols, String requiredDimensionSymbols) bool
Tests if each of the actual dimension symbols in a matrix string satisfies the corresponding required dimension symbol in a pattern string.
matchesDimValue(int actualDimensionValue, String requiredDimensionSymbol) bool
Tests if the dimension value satisfies the dimension symbol.