The Dimensionally Extended 9-Intersection Model (DE-9IM) is a topological model and a standard used to describe the spatial relations of two regions (two geometries in two-dimensions, R2), in geometry, point-set topology, geospatial topology, and fields related to computer spatial analysis. The spatial relations expressed by the model are invariant to rotation, translation and scaling transformations. The matrix provides an approach for classifying geometry relations. 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". When testing two geometries against a scheme, the result is a spatial predicate named by the scheme. The model was developed by Clementini and others based on the seminal works of Egenhofer and others. It has been used as a basis for standards of queries and assertions in geographic information systems (GIS) and spatial databases.
Matrix model The DE-9IM model is based on a 3×3 intersection matrix with the form:
where dim 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). The dimension of non-empty sets (¬∅) are denoted with the maximum number of dimensions of the intersection, specifically 0 for points, 1 for lines, 2 for areas. Then, the domain of the model is {0,1,2,F}. A simplified version of dim(x) values are obtained mapping the values {0,1,2} to T (true), so using the boolean domain {T,F}. The matrix, denoted with operators, can be expressed as
The elements of the matrix can be named as shown below:
Both matrix forms, with dimensional and boolean domains, can be serialized as "DE-9IM string codes", which represent them in a single-line string pattern. Since 1999 the string codes have a standard format. 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 domain of the mask elements is {0,1,2,F,*}, or {T,F,*} for the boolean form. The simpler models 4-Intersection and 9-Intersection were proposed before DE-9IM for expressing spatial relations (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.
Illustration Visually, for two overlapping polygonal geometries, the result of the function DE_9IM(a,b) looks like:
This matrix can be serialized. Reading from left-to-right and top-to-bottom, the result is II=2, IB=1, IE=2, BI=1, BB=0, BE=1, EI=2, EB=1, EE=2. So, in a compact representation as string code is '212101212'.
Spatial predicates Any topological property based on a DE-9IM binary spatial relation is a spatial predicate. For ease of use "named spatial predicates" have been defined for some common relations, which later became standard predicates. The spatial predicate functions that can be derived from DE-9IM include:
Predicates defined with masks of domain {T,F,*}:
Predicates that can be obtained from the above by logical negation or parameter inversion (matrix transposition), as indicated by the last column:
Predicates that utilize the input dimensions, and are defined with masks of domain {0,1,T,*}:
Notice that:
The topologically equal definition does not imply that they have the same points or even that they are of the same class. The output of DE-9IM(a,b) have the information contained in a list of all interpretable predicates about geometries a and b. All predicates are computed by masks. Only Crosses and Overlaps have additional conditions about dim(a) and dim(b). All mask string codes end with *. This is because EE is trivially true, and thus provides no useful information. The Equals mask, T*F**FFF*, is the "merge" of Contains (T*****FF*) and Within (T*F**F***): (II ∧ ~EI ∧ ~EB) ∧ (II ∧ ~IE ∧ ~BE). The mask T*****FF* occurs in the definition of both Contains and Covers. Covers is a more inclusive relation. In particular, unlike Contains it does not distinguish between points in the boundary and in the interior of geometries. For most situations, Covers should be used in preference to Contains. Similarly, the mask T*F**F*** occurs in the definition of both Within and CoveredBy. For most situations, CoveredBy should be used in preference to Within. Historically, other terms and other formal approaches have been used to express spatial predicates; for example region connection calculus was introduced in 1992 by Randell, Cohn and Cohn.
Properties The spatial predicates have the following properties of binary relations:
Reflexive: Equals, Contains, Covers, CoveredBy, Intersects, Within Anti-reflexive: Disjoint Symmetric: Equals, Intersects, Crosses, Touches, Overlaps Transitive: Equals, Contains, Covers, CoveredBy, Within
Interpretation
The choice of terminology and semantics for the spatial predicates is based on reasonable conventions and the tradition of topological studies. Relationships such as Intersects, Disjoint, Touches, Within, Equals (between two geometries a and b) have an obvious semantic:
… excerpt ends here. Continue reading the full article.





