A simplex-based approach to implement dimension independent spatial analyses
Introduction
Many applications in geosciences (e.g., geological modeling, oceanography, pore-space modeling and landslide deformation) need to deal with 3D objects (Apel, 2004, Houlding, 1994, Monga et al., 2007, Pouliot et al., 2008, et al., 1992, Tzenkov and Gospodinov, 2003, Yanbing et al., 2007). There are also applications where “the objects of interest are spatial distribution of 3D continuous geographical phenomena such as the salinity of a body of water, the humidity of the air or the percentage of gold in the rock” (Ledoux and Gold, 2007). There is much effort on the extension of geospatial information systems (GIS) – as the tool to manage spatial information in a wide range of issues from data collection and storage to manipulation and visualization - to support 3D objects (Abdul-Rahman and Pilouk, 2008, Raper, 2000). This extension, among other requirements, needs support for 3D spatial analyses.
Extension of 2D spatial analyses to 3D has been the subject of many studies (Ledoux, 2007, Nonato et al., 2001, Preparata and Hong, 1997). Some research has modified an existing algorithm for a 2D spatial analysis to work for 3D or higher dimensions. Such approaches result in different algorithms, and consequently different implementations, for different dimensions. Following such approaches the code for a package that supports spatial analyses for both 2D and 3D cases is nearly two times the code size for 2D. An alternative is a dimension independent approach. Its advantage is that the same algorithm works for any dimension. However, because of lack of efficient geometric data structures, they are still implemented separately for each dimension. For example, the Bowyer–Watson algorithm to construct Delaunay triangulation is an n-dimensional approach, but it is implemented differently in 2D (Bowyer, 1981) and 3D (Field, 1986). Therefore, from an implementation point of view, there is no advantage in using dimension independent approaches.
This article pushes more toward dimension independency in spatial analyses (Frank, 1999, Frank and Kuhn, 1986, Karimipour et al., 2008a, Karimipour et al., 2008b). We use the list data structure and its manipulating functions to implement dimension independent spatial analyses. A list is a collection of any number of elements of the same type. A set of manipulating functions over lists are implemented, which are independent of the number and type of the elements of the list. As Fig. 1 shows, we represent an n-simplex − a data type that supports spatial objects of any dimension – as a list of nD points. It enables us to describe primitive operations on n-simplexes as manipulating functions over lists, which will be dimension independent. Finally, we define spatial analyses as combinations of primitive operations on n-simplexes. Since the primitive operations on n-simplexes have been implemented independently of dimension, the spatial analyses are also dimension independent.
The rest of the article explains the above diagram and shows how to use this for an example spatial operation. Section 2 introduces Delaunay triangulation as the running example. This is a frequently used spatial analysis in geoscientific applications. In this section, we explain a dimension independent algorithm for this spatial analysis, which will be implemented in the rest of the article. Section 3 reviews the concept of n-simplexes and their primitive operations. In Section 4, we describe the list data structure and introduce a set of manipulating functions over lists. Section 5 develops the n-simplex type and its primitive operations using the list data structure and its manipulating functions. Section 6 contains a dimension independent implementation of Delaunay triangulation using the algorithm described in Section 2. It starts with implementing a set of spatial operations that are required for constructing Delaunay triangulation. Their combination ends up in a dimension independent implementation of Delaunay triangulation. The implementation results for some 2D and 3D points are shown and discussed in Section 7. In Section 8, a case study from hydrographic data of the reservoir of a dam is presented. In this example, the n-dimensional Delaunay triangulations are used to calculate the area and volume of the reservoir at different water levels, which leads to a level–surface–volume diagram. Finally, Section 9 contains some conclusions and ideas for future works.
The algorithms and implementations presented here are n-dimensional. However, we limit the research to 2D and 3D, which are of interest in geosciences and their geometrical illustrations are possible.
Section snippets
Running example: Delaunay triangulation
There are two modeling approaches to treat the real world: object-based modeling where the real world is represented as discrete and identifiable entities and field-based modeling that represents the real world as a continuously changing field (Ledoux, 2007). Although the geoscientific phenomena are continuous, their representation through the field-based approach is problematic, because it is not possible to measure continuous phenomena everywhere. Therefore a sampling process at some finite
n-Simplexes bring different dimensions together
The first step toward generalizing the Bowyer–Watson algorithm is to remove the expressions that depend on the dimension:
- •
Create an initial nD pyramid that contains all of the points
- •
Insert the other points to the construction and update the DT after each insertion as follows:
- ○
Delete all the nD pyramids that violate the nD circumsphere test, which results in creating a connected hole.
- ○
Fill the hole by new nD pyramids, which are created by joining the new point to each element of the boundary of the
- ○
A review on list data structure
A list is a collection of any number of elements of the same type. For instance, all of the following collections are lists:where [a] means a list of values of type ‘a’. The order of elements in a list is significant: [1, 2, 3] is different from [3, 2, 1], so we can talk about the first, the second, … and the last elements
Using lists to implement n-simplexes and their primitive operations
This section implements the n-simplexes and their operations using the list data structure. Next section will use these materials to implement the Bowyer–Watson algorithm for Delaunay triangulation computation.
We begin by defining a type for nD points. In the n-dimensional Euclidean space, a point is represented by its coordinates in the Cartesian coordinate system. In 2D and 3D spaces, they are usually defined as pairs (x, y) and triples (x, y, z), respectively. To have an n-dimensional
Dimension independent implementation of Bowyer–Watson algorithm
This section aims to implement the dimension independent Bowyer–Watson algorithm presented in Section 3.4. It needs a number of spatial analyses, which will be implemented first.
The first required operation is addVertex, which adds a vertex to an n-simplex (Fig. 5):
Another required operation is the border operation. As Fig. 6 shows, this operation extracts the bordering (n−1)-simplexes from a set of connected n-simplexes (A set of n-simplexes S={s1, s2, …, sm} are connected if
Implementation results
The definitions given in 5 Using lists to implement, 6 Dimension independent implementation of were implemented using the functional programming language Haskell (Thompson, 1999). Some 2D and 3D points, whose positions are presented in the Appendix 2, were used as examples. Fig. 7 illustrates the results of the Delaunay triangulation of these points.
To investigate the efficiency of the implementations, the program was executed with different numbers of randomly generated 2D and 3D points (Table
Case study
In this section, the dimension independent implementation of Delaunay triangulation is used to calculate the area and volume of the reservoir of a dam at different water levels, which leads to a level–surface–volume diagram. This diagram is important for managing the water consumption and monitoring the dam construction: observing the daily water level, this diagram is used to estimate the surface area and water amount of the reservoir. This information helps the decision makers in applications
Conclusions and future work
Providing spatial analyses for 3D objects is an essential requirement for many geoscientific applications. The current approach is to use separate implementations of spatial analyses for 2D and 3D objects. This article pushes more toward dimension independency in spatial analyses. It shows how to have not only a dimension independent algorithm, but also a dimension independent implementation. It shows the elegancy of the list data structure and its manipulating functions, which are treated
References (37)
- et al.
Representing geometric structures in 3D tomography soil images: application to pore-space modeling
Computers & Geosciences
(2007) - et al.
Delete and insert operations in Voronoi/Delaunay methods and applications
Computers & Geosciences
(2003) - et al.
Reasoning about geological space: coupling 3D geomodels and topological queries as an aid to spatial data selection
Computers & Geosciences
(2008) - et al.
Spatial Data Modeling for 3D GIS
(2008) Elementary Concepts of Topology
(1961)- Apel, M., 2004. A 3D geoscience information system framework. Ph.D. Dissertation, Technische Universitaet Freiberg,...
Voronoi diagrams—a survey of a fundamental geometric data structure
ACM Computing Surveys
(1991)- et al.
Introduction to Functional Programming
(1988) Computing Dirichlet tessellation
The Computer Journal
(1981)- Bulbul, R., Karimipour, F., Frank, A.U., 2009. A simplex-based dimension independent approach for convex decomposition...
Sur la Sphere Vide (On the empty sphere)
Izvestia Akademia Nauk SSSR, Otdelenie Matematicheskii i Estestvennyka Nauk
One step up the abstraction ladder: combining algebras—from functional pieces to a whole
Cell graphs: a provable correct method for the storage of geometry
Primitives for the manipulation of general subdivisions and the computation of Voronoi diagrams
ACM Transactions on Graphics
Algebraic Topology
3D Geoscience Modeling: Computer Techniques for Geological Characterization
Cited by (13)
Watershed delineation from the medial axis of river networks
2013, Computers and GeosciencesCitation Excerpt :Let S be a set of points in R2. The Voronoi diagrams of the point set S, denoted as VD(S) is a partitioning of the space where each pi∈S is assigned a cell Ci so that all points q∈Ci are closer to pi than any other pj∈S (Karimipour et al., 2010; Okabe et al., 2000) (Fig. 2b). Delaunay triangulation and Voronoi diagrams are dual structures.
A formal framework for the representation of stack-based terrains
2018, International Journal of Geographical Information ScienceAn evaluation and classification of nD topological data structures for the representation of objects in a higher-dimensional GIS
2015, International Journal of Geographical Information ScienceUsing extrusion to generate higher-dimensional GIS datasets
2013, GIS: Proceedings of the ACM International Symposium on Advances in Geographic Information SystemsModelling higher dimensional data for GIS using generalised maps
2013, Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)Medial axis approximation of river networks for catchment area delineation
2013, Lecture Notes in Geoinformation and Cartography
- 1
Tel.: +43 1 58801-12711; fax: +43 1 58801-12799.