6.4 Relational Boolean Operators
6.4.1 The Intersection Matrix
The 4-Intersection Matrix. The analysis of relationships between spatial objects has gained considerable research interest in the last decades. Max J. Egenhofer, Eliseo Clementini, Di Felice, Robert D. Franzosa et al. have all focused on this topic and established an approach to distinguish spatial relations ([CF95], [CFvO93], [CF96], [CFC95], [EF91], [EMH94], [EH91], [ECF94], [Ege93], [EF95]). The first research result of Egenhofer and Clemintini was the4-Intersection-Model[ECF94], which differs between four topological relationships between regions with con- nected boundaries. The 4-Intersection-Model is based on the distinction between the interior of a region A (A◦) and the boundary of a region A (∂A) (see Fig- ure 6.16). All possible combinations of their intersections are described in the
4-Intersection Matrix:
R(A, B) = ∂A∩∂B ∂A∩B
◦
A◦∩∂B A◦∩B◦
!
By considering the values empty (φ) and non-empty (¬φ) for the interior and boundary of each spatial object, one can distinguish between sixteen (24) binary topological relations (see Figure 6.15). Eight of which can be realized for regions with connected boundaries in<2and are calleddisjoint,meet,equal,inside,contains,
covers,coveredByandoverlap. These relations are mutually exclusive. The remain- ing eight possible combinations of empty and non-empty interior and boundary of the two regions are topologically invalid.
Figure 6.15:The 4-Intersection matrix: its different configurations describe eight topologi- cal relations between two regions (From [ECF94])
In [CFvO93], Clementini extended the 4-Intersection-Model matrix through the differentiation not only between empty and non-empty interior and boundary, but also through the dimension of their intersection. In that way the matrix was able to handle relationships between 1-dimensional objects such as lines, as well as between 0-dimensional objects such as points. This extension made it possible to distinct between 53 relationships. Since such a huge differentiation was not useful in practice, the eight more general relationships mentioned above were retained. The 9-Intersection Matrix. The 4-intersection matrix makes possible the evalua- tion of spatial relationships between points, lines and regions in two-dimensional space. However, modern GIS are capable of storing and analysing more complex structures such as regions with holes. The 4-Intersection matrix offers only a very limited service range to distinguish those spatial objects, so that different topological relations of regions with holes are mapped to the same configuration of the 4-Intersection matrix (see [ECF94] for examples).
Holes represent exterior regions within the original region. Thus, in order to make the model compatible with regions with holes, Egenhofer and Clementini extended the 4-Intersection-Model by adding an extra distinction, the exterior of region A (A−). This new model is called9-Intersection-Model matrix ([ECF94], [EMH94], [EH91]): R(A, B) = A◦∩B◦ A◦∩∂B A◦∩B− ∂A∩B◦ ∂A∩∂B ∂A∩B− A−∩B◦ A−∩∂B A−∩B−
Each different set of the 9-Intersections describe a different topological relation. All sets with the same configuration are considered topological equivalent. The simple and most general topological invariants,empty(φ) andnon-empty(¬φ), are used by the 9-Intersection as its contents. As an example, we will analyse the topological relation where region A contains region B (see Figure 6.16).
The 9-Intersection matrix for thecontainsrelationship is:
R(A, B) =
A◦∩B◦ =¬φ A◦∩∂B =¬φ A◦∩B−=¬φ ∂A∩B◦=φ ∂A∩∂B=φ ∂A∩B−=¬φ A−∩B◦=φ A−∩∂B=φ A−∩B−=¬φ = ¬φ ¬φ ¬φ φ φ ¬φ φ φ ¬φ
Figure 6.16:Interior, Boundary and Exterior of two Polygons: Polygon A contains Polygon B
The sequence of values from left to right and from top to bottom is: interior, boundary, and exterior.
Today’s common GIS provide operators for the evaluation of the relationship between geometric objects, as it is a common application in analysis of geospatial data. Those operators, also known as binary predicates or Boolean operators, test whether a certain topological relationship between two spatial objects exists. The Feature Geometry Abstract Specification ([OGC97], chapter eight) specifies three general Boolean operators, equals, contains and intersects and restrict the implementation to the use of the Egenhofer intersection matrix or the dimension extended intersection matrix of Clementini.
Symbol Non Empty? Meaning
T TRUE The intersection at this position is non-empty
F FALSE The intersection at this position is empty
N NULL do not test the intersection at this position
Table 6.1:Values of the Egenhofer Intersection Pattern Matrix
The Egenhofer intersection matrix (see 6.1) can hold the values TRUE (non- empty), FALSE (empty) and NULL (wildcard) to describe the intersection at a position in the matrix. This is sufficient to represent the relations in figure 6.17 unambiguously. The Clementini intersection matrix adds values of the inter- section dimension to the possible content values (see 6.2). As demonstrated in the Extended 4-Intersection-Model the additional distinction of the intersection dimension makes it possible to analyze the relationships between objects of the
Figure 6.17:The 9-Intersection matrix: regions with holes can be separated exactly into the eight specified topological relations by additional distinction of the polygon exterior (from [EH91]).
same geometric type (e.g. Curve/Curve) and objects of different geometric types (e.g. Curve/Surface or Point/Curve). This matrix is also called theDimensionally Extended Nine-Intersection Model (DE-9IM) matrix.
The example in figure 6.16 expressed in theDE-9IMis:
R(A, B) = 2 1 2 φ φ 1 φ φ 2
The Simple Feature Implementation Specification [SFS05a] offers a more detailed separation into equals, disjoint, intersects, touches, crosses, within, con- tainsandoverlap. However, in contrast to the Abstract Specification, it requires the
Symbol Non Empty? Meaning
0 0 The intersection at this position contains only points
1 1 The intersection at this position contains only points and curves
2 2 The intersection at this position contains only points, curves and surfaces
3 3 The intersection at this position contains only points, curves, surfaces and solids
T TRUE The intersection at this position is non-empty
F FALSE The intersection at this position is empty
N NULL This operator does not test the intersection at this position
Table 6.2:Values of the Clementini Intersection Pattern Matrix 9-Intersection model to be used with the pattern matrix of Clementini.
Although the majority of Egenhofer’s and Clementini’s publications in relation to the intersection matrix refers to two dimensional space, the intersection matrix is generally valid for three dimensional space as well. However, in three dimensional space, more relationships between the objects occur and the matrix calculation is more complex.