TauDEM in QGIS
29.06.2012 18:35 · GIS · qgis, plugins, processing
There is a software called TauDEM (Terrain Analysis Using Digital Elevation Models). It provides a free (GNU GPL v2) set of tools for extracting and analysing hydrological information from digital elevation models. TauDEM is developed by David Tarboton of the Water Research Laboratory at Utah State University.
The tools are written in C++, are cross-platform, and have a console interface. Users of ArcGIS 9.3.1 and 10.0 can install an add-on that allows them to run the tools from ArcToolbox using simple dialogs. For others, the only way to use TauDEM is the “scary” command line.
Recently, QGIS also got a powerful and convenient framework that allows easy integration of various tools and libraries (yes, I’m talking about SEXTANTE). Thanks to this framework, QGIS users who need hydrology tools now have a way to use TauDEM directly from QGIS.
Of course, you need to have TauDEM installed in order to use the plugin. While the installation on Windows is quite simple (there are compiled files and detailed installation instructions on the site), Linux users will have to build TauDEM themselves.
Note
You should install/build TauDEM 5.0.6, the plugin does not yet work with version 5.2 (the so-called multi-file version).The following tools are required to build TauDEM on Linux:
- CMake build system
- GCC compiler and related tools
- one of the implementations of the MPI-2 protocol (OpenMPI or MPICH2, others may also work)
Download the source code and unzip it. Before proceeding with compilation, we need to edit some files. In the source code directory, find the file linearpart.h
and after line 44
#include <queue>
add
#include <stdint.h>
So you get something like this
#include <queue>
#include <stdint.h>
Now open the file tiffIO.h
and line 45
#include "stdint.h"
change to
#include <stdint.h>
You can also delete stdint.h
in the source directory if you like; it is not needed.
Open a terminal, go to the directory with the sources, create a build directory, and cd
into it.
cd src
mkdir build
cd build
Start the configuration process (remember to specify your own path)
CXX=mpicxx cmake -DCMAKE_INSTALL_PREFIX=/opt/taudem ..
and then compilation and installation
make && make install
After a few minutes (depending on your computer’s performance), the compilation will be complete, and the binary files will be placed in the bin
directory in the path specified during configuration.
Now start QGIS, install and activate the SEXTANTE and TauDEM SEXTANTE Provider plugins.
Before using the TauDEM provider, it is necessary to configure the plugin, i.e., to specify the directory where the TauDEM tools are located. To do this, go to “Analysis → SEXTANTE Options and Configuration”, find the “TauDEM” group in the list, and specify the path to the tools in the “TauDEM command line tools folder” field. That’s it! Now you can run the tools and get rasters like this
and create models to perform different types of analysis simultaneously.
Please report bugs by mail or (preferably) to the bug tracker.