Dimensionally Extended 9-Intersection Model
   HOME

TheInfoList



OR:

The Dimensionally Extended 9-Intersection Model (DE-9IM) is a
topological Topology (from the Greek words , and ) is the branch of mathematics concerned with the properties of a geometric object that are preserved under continuous deformations, such as stretching, twisting, crumpling, and bending; that is, wit ...
model A model is an informative representation of an object, person, or system. The term originally denoted the plans of a building in late 16th-century English, and derived via French and Italian ultimately from Latin , . Models can be divided in ...
and a
standard Standard may refer to: Symbols * Colours, standards and guidons, kinds of military signs * Standard (emblem), a type of a large symbol or emblem used for identification Norms, conventions or requirements * Standard (metrology), an object ...
used to describe the
spatial relation A spatial relationD. M. Mark and M. J. Egenhofer (1994), "Modeling Spatial Relations Between Lines and Regions: Combining Formal Mathematical Models and Human Subjects Testing"PDF/ref> specifies how some object is located in space in relation to s ...
s of two regions (two geometries in two-dimensions, R2), in
geometry Geometry (; ) is a branch of mathematics concerned with properties of space such as the distance, shape, size, and relative position of figures. Geometry is, along with arithmetic, one of the oldest branches of mathematics. A mathematician w ...
,
point-set topology In mathematics, general topology (or point set topology) is the branch of topology that deals with the basic set-theoretic definitions and constructions used in topology. It is the foundation of most other branches of topology, including differ ...
,
geospatial topology Geospatial topology is the study and application of qualitative spatial relationships between geographic features, or between representations of such features in geographic information, such as in geographic information systems (GIS). For examp ...
, and fields related to computer spatial analysis. The spatial relations expressed by the model are invariant to
rotation Rotation or rotational/rotary motion is the circular movement of an object around a central line, known as an ''axis of rotation''. A plane figure can rotate in either a clockwise or counterclockwise sense around a perpendicular axis intersect ...
,
translation Translation is the communication of the semantics, meaning of a #Source and target languages, source-language text by means of an Dynamic and formal equivalence, equivalent #Source and target languages, target-language text. The English la ...
and
scaling Scaling may refer to: Science and technology Mathematics and physics * Scaling (geometry), a linear transformation that enlarges or diminishes objects * Scale invariance, a feature of objects or laws that do not change if scales of length, energ ...
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 A geographic information system (GIS) consists of integrated computer hardware and software that store, manage, analyze, edit, output, and visualize geographic data. Much of this often happens within a spatial database; however, this is not ...
(GIS) and
spatial database A spatial database is a general-purpose database (usually a relational database) that has been enhanced to include spatial data that represents objects defined in a geometric space, along with tools for querying and analyzing such data. Most ...
s.


Matrix model

The DE-9IM model is based on a 3×3
intersection In mathematics, the intersection of two or more objects is another object consisting of everything that is contained in all of the objects simultaneously. For example, in Euclidean geometry, when two lines in a plane are not parallel, their ...
matrix Matrix (: matrices or matrixes) or MATRIX may refer to: Science and mathematics * Matrix (mathematics), a rectangular array of numbers, symbols or expressions * Matrix (logic), part of a formula in prenex normal form * Matrix (biology), the m ...
with the form: where is the
dimension In physics and mathematics, the dimension of a mathematical space (or object) is informally defined as the minimum number of coordinates needed to specify any point within it. Thus, a line has a dimension of one (1D) because only one coo ...
of the
intersection In mathematics, the intersection of two or more objects is another object consisting of everything that is contained in all of the objects simultaneously. For example, in Euclidean geometry, when two lines in a plane are not parallel, their ...
(∩) of the
interior Interior may refer to: Arts and media * ''Interior'' (Degas) (also known as ''The Rape''), painting by Edgar Degas * ''Interior'' (play), 1895 play by Belgian playwright Maurice Maeterlinck * ''The Interior'' (novel), by Lisa See * Interior de ...
(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 set In mathematics, the empty set or void set is the unique Set (mathematics), set having no Element (mathematics), elements; its size or cardinality (count of elements in a set) is 0, zero. Some axiomatic set theories ensure that the empty set exi ...
s (∅) are denoted as −1 or (false). The dimension of non-empty sets (¬∅) are denoted with the maximum number of dimensions of the intersection, specifically for
points A point is a small dot or the sharp tip of something. Point or points may refer to: Mathematics * Point (geometry), an entity that has a location in space or on a plane, but has no extent; more generally, an element of some abstract topologica ...
, for lines, for
area Area is the measure of a region's size on a surface. The area of a plane region or ''plane area'' refers to the area of a shape or planar lamina, while '' surface area'' refers to the area of an open surface or the boundary of a three-di ...
s. Then, the
domain A domain is a geographic area controlled by a single person or organization. Domain may also refer to: Law and human geography * Demesne, in English common law and other Medieval European contexts, lands directly managed by their holder rather ...
of the model is . A simplified version of values are obtained mapping the values to (true), so using the
boolean domain In mathematics and abstract algebra, a Boolean domain is a set consisting of exactly two elements whose interpretations include ''false'' and ''true''. In logic, mathematics and theoretical computer science, a Boolean domain is usually written ...
. 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 Standard may refer to: Symbols * Colours, standards and guidons, kinds of military signs * Standard (emblem), a type of a large symbol or emblem used for identification Norms, conventions or requirements * Standard (metrology), an object ...
The "
OpenGIS The Open Geospatial Consortium (OGC) is an international voluntary consensus standards organization that develops and maintains international standards for geospatial content and location-based services, sensor web, Internet of Things, GIS data ...
Simple Features Specification For SQL"
Revision 1.1
was released at May 5, 1999. It was the first international standard to establish the format conventions for ''DE-9IM string codes'', and the names of the "Named Spatial Relationship predicates based on the DE-9IM" (see section with this title).
format. For output checking or pattern analysis, a matrix value (or a string code) can be checked by a "
mask A mask is an object normally worn on the face, typically for protection, disguise, performance, or entertainment, and often employed for rituals and rites. Masks have been used since antiquity for both ceremonial and practical purposes, ...
": a desired output value with optional
asterisk The asterisk ( ), from Late Latin , from Ancient Greek , , "little star", is a Typography, typographical symbol. It is so called because it resembles a conventional image of a star (heraldry), heraldic star. Computer scientists and Mathematici ...
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 , or for the boolean form. The simpler models ''4-Intersection'' and ''9-Intersection'' were proposed before DE-9IM for expressing ''spatial relations''M. J. Egenhofer, J. Sharma, and D. Mark (1993)
A Critical Comparison of the 4-Intersection and 9-Intersection Models for Spatial Relations: Formal Analysis
", In

.
(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 .  So, in a compact representation as string code is ''.


Spatial predicates

Any
topological property In topology and related areas of mathematics, a topological property or topological invariant is a property of a topological space that is invariant under homeomorphisms. Alternatively, a topological property is a proper class of topological space ...
based on a DE-9IM
binary Binary may refer to: Science and technology Mathematics * Binary number, a representation of numbers using only two values (0 and 1) for each digit * Binary function, a function that takes two arguments * Binary operation, a mathematical op ...
spatial relation A spatial relationD. M. Mark and M. J. Egenhofer (1994), "Modeling Spatial Relations Between Lines and Regions: Combining Formal Mathematical Models and Human Subjects Testing"PDF/ref> specifies how some object is located in space in relation to s ...
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 : :Predicates that can be obtained from the above by
logical negation In logic, negation, also called the logical not or logical complement, is an operation that takes a proposition P to another proposition "not P", written \neg P, \mathord P, P^\prime or \overline. It is interpreted intuitively as being true ...
or parameter inversion ( matrix transposition), as indicated by the last column: :Predicates that utilize the input dimensions, and are defined with masks of domain : 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 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 and . * 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***): . * 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 The region connection calculus (RCC) is intended to serve for qualitative spatial representation and reasoning. RCC abstractly describes regions (in Euclidean space, or in a topological space) by their possible relations to each other. RCC8 consist ...
was introduced in 1992 by Randell, Cohn and Cohn.


Properties

The spatial predicates have the following properties of
binary relations In mathematics, a binary relation associates some elements of one set called the ''domain'' with some elements of another set called the ''codomain''. Precisely, a binary relation over sets X and Y is a set of ordered pairs (x, y), where x is ...
: * Reflexive: Equals, Contains, Covers, CoveredBy, Intersects, Within *
Anti-reflexive In mathematics, a binary relation R on a set X is reflexive if it relates every element of X to itself. An example of a reflexive relation is the relation " is equal to" on the set of real numbers, since every real number is equal to itself. A ...
: Disjoint *
Symmetric Symmetry () in everyday life refers to a sense of harmonious and beautiful proportion and balance. In mathematics, the term has a more precise definition and is usually used to refer to an object that is invariant under some transformations ...
: 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: ; ''Equals'': ''a'' = ''b'' that is (''a'' ∩ ''b'' = ''a'') ∧ (''a'' ∩ ''b'' = ''b'') ; ''Within'': ''a'' ∩ ''b'' = ''a'' ; ''Intersects'': ''a'' ∩ ''b'' ≠ ∅ ; ''Touches'': (''a'' ∩ ''b'' ≠ ∅) ∧ (''a''ο ∩ ''b''ο = ∅) The predicates ''Contains'' and ''Within'' have subtle aspects to their definition which are contrary to intuition. For example, a line ''L'' which is completely contained in the boundary of a polygon ''P'' is ''not'' considered to be contained in ''P''. This quirk can be expressed as "Polygons do not contain their boundary". This issue is caused by the final clause of the ''Contains'' definition above: "at least one point of the interior of B lies in the interior of A". For this case, the predicate ''Covers'' has more intuitive semantics (see definition), avoiding boundary considerations. For better understanding, the dimensionality of inputs can be used as justification for a gradual introduction of semantic complexity: :


Coverage on possible matrix results

The number of possible results in a boolean ''9IM'' matrix is 29=512, and in a DE-9IM matrix is 39=6561. 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%. The sum 25 % + 12.5 % = 37.5 % is obtained when ignoring overlapping lines in "''Crosses'' OR ''Overlaps''", because the valid input sets are disjoint.


Queries and assertions

The ''DE-9IM'' offers a full descriptive assertion about the two input geometries. It is a mathematical function that represents a complete set of all possible relations about two entities, like a
Truth table A truth table is a mathematical table used in logic—specifically in connection with Boolean algebra, Boolean functions, and propositional calculus—which sets out the functional values of logical expressions on each of their functional arg ...
, the
Three-way comparison In computer science, a three-way comparison takes two values A and B belonging to a type with a total order and determines whether A < B, A = B, or A > B in a single operation, in accordance with the mathematical law of trichotomy. It can b ...
, a
Karnaugh map A Karnaugh map (KM or K-map) is a diagram that can be used to simplify a Boolean algebra expression. Maurice Karnaugh introduced the technique in 1953 as a refinement of Edward W. Veitch's 1952 Veitch chart, which itself was a rediscovery of ...
or a
Venn diagram A Venn diagram is a widely used diagram style that shows the logical relation between set (mathematics), sets, popularized by John Venn (1834–1923) in the 1880s. The diagrams are used to teach elementary set theory, and to illustrate simple ...
. 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''. It says to us that . By other hand, if we check predicates like ''Intersects''(''a'',''b'') or ''Touches''(''a'',''b'') — for the same example we have "''Intersects''= and ''Touches''=" — 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). This independence of geometry-type and the lack of completeness, on ''predicates'', are useful for general queries about two geometries: : For usual applications, the use of ''spatial predicates'' also is justified by being more
human-readable In computing, a human-readable medium or human-readable format is any encoding of data or information that can be naturally read by humans, resulting in human-readable data. It is often encoded as ASCII or Unicode text, rather than as binary da ...
than ''DE-9IM'' descriptions: a typical user have better intuition about predicates (than a set of interiors/border/exterior intersections). Predicates have useful
semantic Semantics is the study of linguistic Meaning (philosophy), meaning. It examines what meaning is, how words get their meaning, and how the meaning of a complex expression depends on its parts. Part of this process involves the distinction betwee ...
into usual applications, so it is useful the translation of a ''DE-9IM'' description into a list of all associated predicates,Note. Th
Oracle's spatial function
do only a partial translation, internally, offering to user a mask for a or-list of predicates to be checked, instead the DE-9IM string.
that is like a
casting process Casting is a manufacturing process in which a liquid material is usually poured into a mold, which contains a hollow cavity of the desired shape, and then allowed to solidify. The solidified part is also known as a casting, which is ejected or b ...
between the two different semantic types. Examples: * The string codes "" and "" have the semantic of "''Intersects & Crosses & Overlaps''". * The string code "" have the semantic of "''Equals''". * The string codes "", "", "", "", and "" have the semantic of "''Intersects & Touches''".


Standards

The
Open Geospatial Consortium The Open Geospatial Consortium (OGC) is an international voluntary consensus standards organization that develops and maintains international standards for geospatial content and location-based services, sensor web, Internet of Things, Geographi ...
(OGC) has standardized the typical spatial predicates (Contains, Crosses, Intersects, Touches, etc.) as boolean functions, and the DE-9IM model,"OpenGIS Implementation Specification for Geographic information - Simple feature access - Part 2: SQL option", OGC, http://www.opengeospatial.org/standards/sfs as a function that returns a string (the DE-9IM code), with domain of , meaning =point, =line, =area, and ="empty set". This DE-9IM string code is a standardized format for data interchange. The Simple Feature Access (ISO 19125) standard, Open Geospatial Consortium Inc. (2007), "OpenGIS® Implementation Standard for Geographic information - Simple feature access - Part 2: SQL option"
OGC document
''06-104r4'' version 1.2.1 (review of 2010-08-04).
in the chapter 7.2.8, "SQL routines on type Geometry", recommends as supported routines the ''SQL/MM Spatial'' (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''. The DE-9IM in the OGC standards use the following definitions of Interior and Boundary, for the main OGC standard geometry types:


Implementation and practical use

Most spatial databases, such as
PostGIS PostGIS ( ) is an open source software program that adds support for geographic objects to the PostgreSQL object-relational database. PostGIS follows the Simple Features for SQL specification from the Open Geospatial Consortium (OGC). PostGIS is ...
, implements the ''DE-9IM()'' model by the standard functions: ST_Relate, ST_Equals, ST_Intersects, etc. The function ST_Relate(a,b) outputs the standard OGC's ''DE-9IM string code''. Examples: two geometries, ''a'' and ''b'', that intersects and touches with a point (for instance with and ), can be ST_Relate(a,b)='FF1F0F1F2' or ST_Relate(a,b)='FF10F0102' or ST_Relate(a,b)='FF1F0F1F2'. It also satisfies ST_Intersects(a,b)=true and ST_Touches(a,b)=true. When ST_Relate(a,b)='0FFFFF212', the returned DE-9IM code have the semantic of "Intersects(a,b) & Crosses(a,b) & Within(a,b) & CoveredBy(a,b)", that is, returns true on the boolean expression ST_Intersects(a,b) AND ST_Crosses(a,b) AND ST_Within(a,b) AND ST_Coveredby(a,b). The use of is faster than direct computing of a set of correspondent predicates.Chapter 4. Using PostGIS: Data Management and Queries
/ref> There are cases where using is the only way to compute a complex predicate — see the example of the code 0FFFFF0F2,JTS test case of "point A within one of B points", http://www.vividsolutions.com/jts/tests/Run1Case4.html 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 by adding a mask parameter, or use a returned string into the function. When using , it returns a boolean. Examples: * ST_Relate(a,b,'*FF*FF212') returns ''true'' when ST_Relate(a,b) is 0FFFFF212 or 01FFFF212, and returns ''false'' when 01FFFF122 or 0FF1FFFFF. * ST_RelateMatch('0FFFFF212','*FF*FF212') and ST_RelateMatch('01FFFF212','TTF*FF212') are ''true'', ST_RelateMatch('01FFFF122','*FF*FF212') is ''false''.


Synonyms

* "Egenhofer-Matrix" is a synonym for the ''9IM'' 3x3 matrix of boolean domain."Encyclopedia of GIS", S. Shekhar, H. Xiong. . * "Clementini-Matrix" is a synonym for the
DE-9IM The Dimensionally Extended 9-Intersection Model (DE-9IM) is a topological Interpretation (logic), model and a Specification (technical standard), standard used to describe the spatial relations of two regions (two 2D geometric model, geometries ...
3x3 matrix of domain. * "Egenhofer operators" and "Clementini operators" are sometimes a reference to matrix elements as ''II'', ''IE'', etc. that can be used in boolean operations. Example: the predicate "''G1'' contains ''G2''" can be expressed by "", that can be translated to mask syntax, T*****FF*. *
Predicate Predicate or predication may refer to: * Predicate (grammar), in linguistics * Predication (philosophy) * several closely related uses in mathematics and formal logic: **Predicate (mathematical logic) **Propositional function **Finitary relation, o ...
s "meets" is a synonym for ''touches''; "inside" is a synonym for ''within'' * Oracle's "ANYINTERACT" is a synonym for ''intersects'' and "OVERLAPBDYINTERSECT" is a synonym for ''overlaps''. Its "OVERLAPBDYDISJOINT" does not have a corresponding named predicate. * In
Region connection calculus The region connection calculus (RCC) is intended to serve for qualitative spatial representation and reasoning. RCC abstractly describes regions (in Euclidean space, or in a topological space) by their possible relations to each other. RCC8 consist ...
operators offer some synonyms for
predicate Predicate or predication may refer to: * Predicate (grammar), in linguistics * Predication (philosophy) * several closely related uses in mathematics and formal logic: **Predicate (mathematical logic) **Propositional function **Finitary relation, o ...
s: ''disjoint'' is DC (disconnected), ''touches'' is EC (externally connected), ''equals'' is EQ. Other, like ''Overlaps'' as PO (partially overlapping), need context analysis or composition.


See also


References

{{Reflist


External links


Point Set Theory and the DE-9IM Matrix


Matrices (mathematics) Geometric topology Geographic data and information Binary operations Geometric intersection