The spatial relations expressed by the model are invariant to rotation, translation and scaling transformations.
Roughly speaking, with a true/false matrix domain, there are 512 possible 2D topologic relations, that can be grouped into binary classification schemes.
The English language contains about 10 schemes (relations), such as "intersects", "touches" and "equals".
The model was developed by Clementini and others[1][2] based on the seminal works of Egenhofer and others.
[3][4] It has been used as a basis for standards of queries and assertions in geographic information systems (GIS) and spatial databases.
is the dimension of the intersection (∩) of the interior (I), boundary (B), and exterior (E) of geometries a and b.
The terms interior and boundary in this article are used in the sense used in algebraic topology and manifold theory, not in the sense used in general topology: for example, the interior of a line segment is the line segment without its endpoints, and its boundary is just the two endpoints (in general topology, the interior of a line segment in the plane is empty and the line segment is its own boundary).
In the notation of topological space operators, the matrix elements can be expressed also as The dimension of empty sets (∅) are denoted as −1 or F (false).
For output checking or pattern analysis, a matrix value (or a string code) can be checked by a "mask": a desired output value with optional asterisk symbols as wildcards — that is, "*" indicating output positions that the designer does not care about (free values or "don't-care positions").
The simpler models 4-Intersection and 9-Intersection were proposed before DE-9IM for expressing spatial relations[6] (and originated the terms 4IM and 9IM).
They can be used instead of the DE-9IM to optimize computation when input conditions satisfy specific constraints.
Visually, for two overlapping polygonal geometries, the result of the function DE_9IM(a,b) looks like:[7]
[4] Relationships such as Intersects, Disjoint, Touches, Within, Equals (between two geometries a and b) have an obvious semantic:[10][13] The predicates Contains and Within have subtle aspects to their definition which are contrary to intuition.
For this case, the predicate Covers has more intuitive semantics (see definition), avoiding boundary considerations.
The percentage of these results that satisfy a specific predicate is determined as following, On usual applications the geometries intersects a priori, and the other relations are checked.
The composite predicates "Intersects OR Disjoint" and "Equals OR Different" have the sum 100% (always true predicates), but "Covers OR CoveredBy" have 41%, that is not the sum, because they are neither logical complements or independent relations; similarly "Contains OR Within", have 21%.
It is a mathematical function that represents a complete set of all possible relations about two entities, like a Truth table, the Three-way comparison, a Karnaugh map or a Venn diagram.
Each output value is like a truth table line, that represent relations of specific inputs.
As illustrated above, the output '212101212' resulted from DE-9IM(a,b) is a complete description of all topologic relations between specific geometries a and b.
By other hand, if we check predicates like Intersects(a,b) or Touches(a,b) — for the same example we have "Intersects=true and Touches=true" — it is an incomplete description of "all topologic relations".
Predicates also do not say any thing about the dimensionality of the geometries (it doesn't matter if a and b are lines, areas or points).
Examples: The Open Geospatial Consortium (OGC) has standardized the typical spatial predicates (Contains, Crosses, Intersects, Touches, etc.)
The Simple Feature Access (ISO 19125) standard,[17] in the chapter 7.2.8, "SQL routines on type Geometry", recommends as supported routines the SQL/MM Spatial[18] (ISO 13249-3 Part 3: Spatial) ST_Dimension, ST_GeometryType, ST_IsEmpty, ST_IsSimple, ST_Boundary for all Geometry Types.
The same standard, consistent with the definitions of relations in "Part 1, Clause 6.1.2.3" of the SQL/MM, recommends (shall be supported) the function labels: ST_Equals, ST_Disjoint, ST_Intersects, ST_Touches, ST_Crosses, ST_Within, ST_Contains, ST_Overlaps and ST_Relate.
Examples: two geometries, a and b, that intersects and touches with a point (for instance with
The use of ST_Relate() is faster than direct computing of a set of correspondent predicates.
[7] There are cases where using ST_Relate() is the only way to compute a complex predicate — see the example of the code 0FFFFF0F2,[21] of a point that not "crosses" a multipoint (an object that is a set of points), but predicate Crosses (when defined by a mask) returns true.
It is usual to overload the ST_Relate() by adding a mask parameter, or use a returned ST_Relate(a,b) string into the ST_RelateMatch() function.