TerrainView – Interactive visualization of high resolution DTMs

TerrainView allows the visualization of and navigation within high resolution digital terrain models (DTMs) that exceeds the memory capacity of todays graphic boards. Color coding, relief shading, and other visualization features are calculated in the fragment shader stage to achieve interactive frame rates. Morphometric data (longitudinal sections, cross-sections, gradients) can be derived placing polygonal curves.

TerrainView is developed in cooperation with the "Institut für Planetologie" for geomorphological studies of the digital terrain model of Baden-Württemberg provided by the Landesamt für Geoinformation und Landentwicklung.

Data base: LIDAR data acquired and processed by Landesamt für Geoinformation und Landentwicklung, Baden-Württemberg (2000 – 2005). Resolution: X/Y: 1 m; Z: 0.15 m.

See also our project page accompanying our article:
Beckenbach et al., Quaternary Science Journal 63, 107-129 (2014)

I have developed this software during my time at the Visualization Research Center (Stuttgart).


Software Details

The digital terrain model of Baden-Württemberg ("Geobasisdaten") provided by the Landesamt für Geoinformation und Landentwicklung (LGL, Stuttgart) has a resolution of 1 m in horizontal and 0.15 m in vertical direction. It is based on LiDAR data and delivered as 1001 x 1001 m2 tiles consisting of Gauss-Krüger coordinates and height values stored in ASCII format, where each data entry (easting, northing, height) covers 26 characters (26 Bytes). The complete raw dataset with 37676 tiles needs about 1 TB of disk space.

This model is ideally suited for systematic geomorphic analyses as it is extremely accurate and allows reliable large-distance correlation of geologic and geomorphic phenomena. Commercial tools for DTM processing (e.g., ArcGIS, Rivertools, SCOP++), to our experience however, are able to handle only a limited subset of the dataset at once (roughly up to about 50 GB). For larger datasets, the performance decreases dramatically. Hence, interactive explorations and morphological studies for large areas, where the complete dataset must be available to ensure detailed height information throughout, become cumbersome.

On this reason we developed 'TerrainView' - an OpenGL-based platform for visualizing DEMs in orthographic and perspective projection with interactive navigation on very large datasets and special tools for geomorphological analysis. The key concept to master the huge dataset is to reformat it into a quadtree data structure that decomposes the spatial domain recursively into uniform quads (tiles). Each quad has the same pixel resolution but a different pixel-size depending on the level of detail (LOD). The user can freely navigate among 9 levels of detail without delay. Memory usage is minimized as only these tiles that are currently visible and those that will become visible next are effectively loaded. This dynamic loading is thread-based to prevent jerking while navigating with the mouse. Levels of detail are as follows: LOD 0: 256 m/pixel; LOD 1: 128 m/pixel; LOD 2: 64 m/pixel; LOD 3: 32 m/pixel; LOD 4: 16 m/pixel; LOD 5: 8 m/pixel; LOD 6: 4 m/pixel; LOD 7: 2 m/pixel; LOD 8: 1 m/pixel.

Reformatting has to be done only once in a pre-processing step. To build the quadtree, we first set the base length of each tile to be 1024 x 1024 pixels. The root tile of the quadtree encompasses the entire area of Baden-Württemberg (resolution: 256 m/pixel). The quadtree is built top-down; at level 8, each height value of the raw dataset with corresponding easting-northing coordinates must be inserted into the correct tile. As this coordinate pair can be reconstructed from the quadtree structure, it is only necessary to store the height value. We use single precision floating point numbers (4 Byte) for the height value reducing the size of the dataset to about a sixth. Each lower level of the quadtree follows from the higher level by integrating 4 neighbouring height values until ending up at the root level. Despite an overhead through storing lower resolutions the entire dataset finally reduced to 189 GB in binary format.

Terrain visualization in orthographic and perspective projection is realized directly on the graphics board (graphics processing unit) using OpenGL shading language (GLSL). Colour coding, relief shading and other visualization features are calculated at interactive frame rates without any additional preprocessing steps. Light direction and vertical exaggeration can be adapted to produce optimal shading and relief effects. Gradients are instantly available in normal and inverse mode and can be exaggerated to enhance steepness; contours can be spaced on individual criteria and draped as overlays on all types of view. Morphometric data (longitudinal sections, cross-sections, gradients) can be derived placing polygons and/or serial sections.

A new feature for geomorphic analysis is a variably transparent cone intersecting the surface as a function of the parameters gradient, apex height, and base length. TerrainView is based on Qt and thus is platform-independent. All parameters of a chosen scene can be saved as Qt scripts for rapid reproducibility; all types of views can be exported as high to very high resolution png files.

Book publication:

H. Seyfried, T. Simon, E. Beckenbach, T. Müller
Die Landschaften von Baden-Württemberg
Eine ästhetische Wanderung durch den Südwesten und seine geologische Geschichte
Schmidt-Verlag (2021), 2. Auflage
ISBN: 978-3-87707-204-2

Die Bilder im Buch sind zum großen Teil mit der Software TerrainView entstanden, die speziell für die Darstellung großer digitaler Geländemodelle entwickelt wurde.
H. Seyfried, T. Simon, E. Beckenbach, T. Müller
Der Südwesten im digitalen Geländemodell – Wie LiDAR Daten unsere Sicht auf die Welt verändern
Sonderbände der Gesellschaft für Naturkunde in Württemberg e.V. – Band 4
Schmidt-Verlag (2019)
ISBN: 978-3-87707-161-8