Elsevier

Computers & Geosciences

Volume 36, Issue 9, September 2010, Pages 1123-1134
Computers & Geosciences

A simplex-based approach to implement dimension independent spatial analyses

https://doi.org/10.1016/j.cageo.2010.03.002Get rights and content

Abstract

Many applications in geosciences need to deal with 3D objects. For this, among other requirements, 2D spatial analyses must be extended to support 3D objects. This extension is an important research topic in GIS and computational geometry. Approaches that extend an existing algorithm for a 2D spatial analysis to work for 3D or higher dimensions lead to different algorithms and 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. While dimension independent algorithms are an alternative toward generalization, they are still implemented separately for each dimension. The main reason is that each dimension is modeled using a different data structure that requires its own implementation details. In this article we use the list data structure to implement n-simplexes—as a data type that supports spatial objects of any dimension. Primitive operations on n-simplexes become manipulating functions over lists, which are independent of the number and type of the elements. 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 dimension independent, too. Construction of Delaunay triangulation of nD points, as the basic data structure for many geoscientific researches, is used here as the running example. The implementation results for Delaunay triangulation of some 2D and 3D points are presented and discussed. As a case study the implementations are 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.

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:[1,2,7,5,1,4][Int][a,c,a,d,k][Char][(1,4),(5,3),(9,3),(6,2),(3,3)][(Int,Int)][True,True,False,True,False,False][Bool][[1,2,7],[5,1],[8,5,2,9],[3],[5,1]][[Int]]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):addVertex(v,s)=(v:s)

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)

  • B.N. Delaunay

    Sur la Sphere Vide (On the empty sphere)

    Izvestia Akademia Nauk SSSR, Otdelenie Matematicheskii i Estestvennyka Nauk

    (1934)
  • Field, D.A., 1986. Implementing Watson’s algorithm in three dimension. In: Proceedings 2nd Annual Symposium on...
  • A.U. Frank

    One step up the abstraction ladder: combining algebras—from functional pieces to a whole

  • A.U. Frank et al.

    Cell graphs: a provable correct method for the storage of geometry

  • L. Guibas et al.

    Primitives for the manipulation of general subdivisions and the computation of Voronoi diagrams

    ACM Transactions on Graphics

    (1985)
  • A. Hatcher

    Algebraic Topology

    (2002)
  • S.W. Houlding

    3D Geoscience Modeling: Computer Techniques for Geological Characterization

    (1994)
  • Karimipour, F., Delavar, M.R., Frank, A.U., 2008a. A mathematical tool to extend 2D spatial operations to higher...
  • Cited by (13)

    • Watershed delineation from the medial axis of river networks

      2013, Computers and Geosciences
      Citation 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 Science
    • Using extrusion to generate higher-dimensional GIS datasets

      2013, GIS: Proceedings of the ACM International Symposium on Advances in Geographic Information Systems
    • Modelling 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
    View all citing articles on Scopus
    1

    Tel.: +43 1 58801-12711; fax: +43 1 58801-12799.

    View full text