An Object-Orientated Approach to Hydrological Modelling based on a Triangular Irregular Network

Aidan Slingsby.

Introduction

This page is a summary of the motivation, background and some of the issues which formed the basis of my MSc research project which was done at the Department of Geography at the University of Edinburgh and was supervised by Nick Nulton and Neil Stuart. The project, completed in September 2002. was concerned with how methods of internal data representation in hydrological models may affect models' outputs. The MSc thesis and a paper presented at GISRUK in 2003 are available for download at the bottom of this page.

Motivation

The motivation of this project was a paper by Braun and Sambridge (1997) which showed that the outputs of landscape evolution models may be affected by the underlying data structures. They compared the output of a landscape evolution model which was run on a regular data structure (raster) with that of the same model run on an irregular data structure (using a triangular irregular network). They observed that under certain circumstances, artefacts of the underlying regularity of rasters may be manifested in the model output (see Figure 1) and that the use of irregular data structures may be a way to reduce this problem.

Results from Braun and Sambridge (1997)
Figure 1: Regular and irregular data models compared. (a) Landscape evolution model output, performed on a regular grid. The simulated river channels have a shape strongly controlled by the regular geometry of the grid. (b) Output of the same simulation, but performed on an irregular TIN-based structure. Channel networks have a more 'organic' and natural-looking geometry. Source: Braun and Sambridge (1997).

Rasters are in widespread use and one of the reasons for this is that the simplicity of structure lends itself to efficient computational processing. Irregular data structures are more complex. In rasters, the positions and topology of grid cells is implicit from the position in the data structure. However, the same is not true for irregular data structures where the positions of spatial units need to be stored explicitly.

Traditional methods of modelling, which will be termed 'function-orientated' methods are built around a central toolbox of functions. Data is imported and then these methods operate upon the imported data producing an output (see figure 2a). This separation of data and function is no problem where the data structures are simple, but where the data structures are more complex, this approach difficult to implement. An alternative approach is sought in the realm of object-orientated programming.

Object-orientated programming is now the most widespread type of programming practice which has taken over from function-orientated computer programs for large projects. The reason for its popularity and widespread use it that if its concepts are fully followed, the programmer is forced to treat the program as a system by compartmentalising it into logical units (objects). Objects are self-contained units which hold their own data and contain routines to process their own data, but are able to interact with each other to form a system. These concepts make the program easier to manage and debug and also to reuse code. The natural environment can be seen as a system. Rather than picturing a river system as being a set of tiled and regular cells which water passes into and out of, it can perhaps be considered more as a system of tributaries, pieces of hillside and lakes. The concept of breaking a natural system into self-contained units which can do processing upon themselves and can interact to form a whole system is appealing. As well as the practical aspect of implementing more complex irregular data structures, this also fits in with the desire to be able to model a natural system in a more 'natural way' - seeing it as a system based upon an irregular data structure. Figure 2b shows the way in which this differs from the function-orientated system. The system is the landscape, which is formed by the interaction of 'landscape elements'.

Functional and Object-Orientated Approaches
Figure 2: a) Traditional raster-based function-orientated approach to modelling. Raster data is imported, and then a tookbox of functions is used to operated upon the data to product the output. Data and process are separated. b) TIN-based object-orientated approach as used by the prototype created in this project. This treats the landscape as a system of interacting components. Although the initial data may be in a raster format, a TIN is created from this in an object-oriented data structure. Object-orientated techniques are used make the structure a system composed of interacting logical units (objects). Each object has built-in routines, giving them the 'ability' to built themselves, maintain themselves, derive information about themselves and do hydrological modelling upon themselves. Source: Slingsby (2002).

References

Braun, J. and Sambridge, M. 1997. Modelling Landscape Evolution on Geological Time Scales: a New Method Based on Irregular Spatial Discretization. Basin Research 9, pp27-52.

Research Project

The research project explored an object orientated methodology in which a hydrological system is considered to be a series of interacting hydrological elements. From a practical point of view, object-orientated techniques improve the ease of implementation of some software and are easier to debug. From a hydrological point of view, the way in which the system is abstracted into interacting irregular elements gives an alternative perspective on how some hydrological models could be built in the future. The use of irregular data structures can be used to address some of the widely-recognised problems with raster-based hydrological models.

A prototype triangular irregular network based object-orientated system was built ('TINMOD') as part of this project. Using digital elevation models of a selection of river basins, the issues explored were tested, compared and evaluated. For more information, please see the downloads.

Downloads

Slingsby, A.D. 2002. An Object-Orientated Approach to Hydrological Modelling based on a Triangular Irregular Network (Research Paper) MSc thesis (unpublished), Department of Geography, University of Edinburgh.

Slingsby, A. 2003. An Object-Orientated Approach to Hydrological Modelling using Triangular Irregular Networks. Proceedings of GISRUK03, City University, London, UK.

This project was conducted at the Department of Geography at the University of Edinburgh and it was funded by ESRC (Economic and Social Research Council) and Ordnance Survey. Data was provided by the Centre for Ecology and Hydrology. Thanks also to my supervisors Nick Hulton and Neil Stuart.