Definition 7 The coboundary of a n-dimensional simplex Snis the set of all (n + 1)-
dimensional simplexes Sn+1 that are (partially) bounded by Sn, i.e. it is the set of
which the simplex Sn is part of their boundaries ∂Sn+1.
With respect to orientation of simplexes, this definition can be interpreted in a strict and in a less strict way. For example, if one ignores orientation, a triangle has three boundary segments (its edges) and two coboundary segments (the adjacent tetra- hedrons). But if one applies the concept of orientation strict, a triangle has one coboundary (a tetrahedron), while the second tetrahedron from the previous example will be the coboundary of this triangles opposite (the triangle with identical geome- try, but opposite orientation). Note that this is only the case if all tetrahedrons have similar orientation, i.e. all positive or all negative. If this is not the case, a triangle might have one (in case of consistent orientation of two neighbouring tetrahedrons) or two (in case of opposite orientation of two neighbouring tetrahedrons) coboundaries. Although these examples all deal with triangles, coboundary relationships exist in all dimensions, so for instance an edge has two boundary segments (its nodes) and (in a TEN) an unknown number of coboundary segments (adjacent triangles).
4.4
Operations on simplexes and simplicial com-
plexes
In a simplicial complex-based approach, features will be represented by a set of sim- plexes. As a result, certain operations on features will translate into operations on simplexes. For instance, a point-in-polyhedron test at feature level will be performed in the simplicial complex, as all simplexes are convex. Guaranteed convexity will enable the use of more efficient point-in-polyhedron algorithms.
Another example is the operation to obtain the volume of a building, which will be performed as the sum of the volume calculations of the individual tetrahedrons. The Cayley-Menger determinant (Colins, K.D. 2003) is a determinant that gives the volume of a n-simplex in m-dimensional space. With simplex Sn=< v0, . . . , vn>the
(n + 1) × (n + 1) matrix B = (βij) is given by βij = |vi− vj|2, i.e. a symmetrical
matrix with the squares of the lengths of the tetrahedron’s edges. Matrix ˆB is the (n + 2) × (n + 2) matrix obtained by bordering matrix B with a top row (0, 1, . . . , 1) and a left column (0, 1, . . . , 1)T.
Definition 8 The volume V of a simplex Sn is given by:
V2(Sn) =
(−1)n+1
2n(n!)2 det( ˆB)
Since matrix ˆB consists of distances between nodes instead of node coordinates, the formula is dimension independent, meaning that it will produce the volume of a n- simplex, irrespective of the dimension of the space in which Sn is located. Note that
68 Chapter 4. Theoretical foundations: Poincar´e simplicial homology
matrix ˆBis symmetrical! For n = 2 (a triangle) and n = 3 (a tetrahedron) this results in (with dij as length of edge < vi, vj>):
n= 2 : −16V2= 0 1 1 1 1 0 d2 01 d202 1 d210 0 d212 1 d2 20 d221 0 n= 3 : 288V2= 0 1 1 1 1 1 0 d201 d202 d203 1 d2 10 0 d212 d213 1 d2 20 d221 0 d223 1 d2 30 d231 d232 0
Simplexes offer not only support for calculations, but also for more complex spatial operations like buffer (de Vries 2001) and overlay (van der Most 2004). Verbree et al. (2005) describe the possibilities of executing these classic GIS operators on tetra- hedrons. Validation is another operation that can be performed on both simplexes and features. At simplicial complex level the validation of a TEN can performed by applying the Euler-Poincar´e formula: N − E + F − V = 0 with N the number of nodes, E the number of edges, F the number of faces and V the number of volumes (including the exterior). This formula holds not only in three dimensions, but can be generalised into general dimension:
n
X
i=0
(−1)i−1Ni−1= 1 − (−1)i
with Ni the number of i-dimensional simplexes and n the dimension of the simplicial
complex plus one. Note that Nn−1 includes the exterior space! In this formula, n
equals the number of different simplex types, as for instance in a 3D simplicial complex four simplex types occur: 0-simplexes, 1-simplexes, 2-simplexes and 3-simplexes. This formula leads to the following dimension-specific formulas for the 0D-3D cases:
i= 1 N0= 2
i= 2 N0− N1= 0
i= 3 N0− N1+ N2= 2
i= 4 N0− N1+ N2− N3= 0
As illustrated in figure 4.8 with a 2D and a 3D example, the Euler-Poincar´e formula holds for simplicial complexes in general and not only for simplicial complexes of homogeneous dimension. As a result, dangling edges and faces cannot be detected with this formula. Combining simplex validation results leads to validation on feature level. If one is interested in validating a volume feature, three checks need to be performed:
1. A valid TEN is required, so all criteria implied by definition 5 need to be met and the tetrahedrons should have consequent positive orientation.
4.4. Operations on simplexes and simplicial complexes 69 2D: n− e + f = 2 3D: n− e + f − v = 0 (12 − 21 + 11 = 2) (13 − 22 + 11 = 2) (5 − 9 + 7 − 3 = 0) (7 − 12 + 8 − 3 = 0)
Figure 4.8: The Euler-Poincar´e formula holds for all simplicial complexes; it does not require homogeneous dimension. As a result, dangling edges and faces cannot be detected with this formula
2. The boundary of the volume feature (represented by a set of constraints) should be watertight.
3. The interior of the volume feature is face connected, thus preventing the creation of two separate volumes that are either disjoint or touch only on edge or node level.
This support for validation of 3D features is an important characteristic of a simplicial complex-based approach, since it simplifies validation significantly, compared to the validation of polyhedrons as described by Kazar et al. (2008).
Chapter 5
A Simplicial Complex-based
Solution for 3D topography
With the introduction of the simplicial complex-based data structure, this chapter gets down to the very core of the research. Previously the problem field of 3D topo- graphy was introduced and requirements for both data model and data structure were derived. At a conceptual level it was decided to model the real world with a full 3D approach. A solid foundation for working with simplexes was found in the mathematical field of simplicial homology. This chapter will present a data structure that takes maximal advantage of the possibilities of simplicial homology, in order to represent the 3D data model such that it meets the requirements derived earlier.
Although the actual insertion of topographic features in the data structure will be the subject of the next chapter, section 5.1 will present the representation of topographic features in the TEN, since this will provide more insight in the presented data structure. In contrast to what one might expect, TEN structures can be applied and implemented in multiple ways. Section 5.2 will present three different conceptual models of a TEN data structure. The third version is based on simplicial homology as introduced in the previous chapter and will be discussed in more detail in section 5.3. This chapter ends in section 5.4 with the actual proof-of-concept implementation as this will demonstrate the synergy between the simplicial homology-based approach and a DBMS implementation.
5.1
Representing topographic features in a TEN
The most important question is how topographic features are represented within the TEN. The UML class diagrams presented in chapter 3 and the updated versions that will be presented in the next section, illustrate the use of constrained edges and trian- gles to ensure the presence of the feature boundaries in a constrained tetrahedronised irregular network. Section 2.5.1 showed that in the 2D case (a TIN) constrained edges are used to guarantee that polygon boundaries remain present, regardless of other point insertion or edge update operations. In the current 3D case one would like to
72 Chapter 5. A simplicial complex-based solution for 3D topography
Figure 5.1: Input data (top), the resulting tetrahedronisation (mid) and as output the constrained triangles (i.e. the feature boundaries)(bottom)
ensure the presence of boundary faces (section 2.5.3), as they bound the volume fea- tures, but unfortunately 3D algorithms still work with constrained edges (Shewchuk 2004). As a result using constraints requires a two-step approach: first one needs to ensure the presence of all constrained edges, second one needs to check whether the required constrained faces are present (i.e. whether they are intersected by other edges) and if necessary, to alter the TEN configuration such that the required faces are present. To further illustrate the concept of representing features in a TEN, the following four steps are required to insert a volume feature in a TEN (Penninga and van Oosterom 2006b):
1. Its outer boundary needs to be triangulated and all resulting edges (and faces) should be treated as constraints
2. The interior needs to be tetrahedronised. This tetrahedronisation can be per- formed either directly in the complete TEN or separately, after which all re- sulting edges can be inserted into the TEN. Input in both cases is the set of constraint edges of the outer boundary
3. Regardless which of the two previous options is used in the previous step, lo- cal re-tetrahedronisation might be necessary in order to optimise the structure