Sie sind auf Seite 1von 11

Computers & Geosciences 37 (2011) 250260

Contents lists available at ScienceDirect

Computers & Geosciences

journal homepage:

TecDEM: A MATLAB based toolbox for tectonic geomorphology,

Part 1: Drainage network preprocessing and stream prole analysis$
Faisal Shahzad , Richard Gloaguen
Remote Sensing Group, Institute of Geology, Freiberg University of Mining and Technology, Bernhard-von-Cotta-Strasse 2, 09599 Freiberg, Germany

a r t i c l e i n f o

a b s t r a c t

Article history:
Received 2 March 2010
Received in revised form
9 June 2010
Accepted 18 June 2010
Available online 9 November 2010

We present TecDEM, a software shell implemented in MATLAB that applies tectonic geomorphologic
tasks to digital elevation models (DEMs). The rst part of this paper series describes drainage partitioning
schemes and stream prole analysis. The graphical user interface of TecDEM provides several options:
determining ow directions, stream vectorization, watershed delineation, Strahler order labeling, stream
prole generation, knickpoints selection, Concavity, Steepness and Hack indices calculations. The
knickpoints along selected streams as well as stream prole analysis, and Hack index per stream prole
are computed using a semi-automatic method. TecDEM was used to extract and investigate the stream
proles in the Kaghan Valley (Northern Pakistan). Our interpretations of the TecDEM results correlate well
with previous tectonic evolution models for this region. TecDEM is designed to assist geoscientists in
applying complex tectonic geomorphology tasks to global DEM data.
& 2010 Elsevier Ltd. All rights reserved.

Digital elevation models
Stream prole analysis
Hack index

1. Introduction
Areas of the planet that are largely inaccessible for practical
reasons pose a major limitation to our understanding of tectonics and
geomorphology at regional and local scales. Efforts to tackle these
issues have resulted in recent theoretical developments in tectonic
geomorphology and drainage network processing. Drainage networks
exhibit critical relationships between relief, elevation, and denudation
rate (Kirby and Whipple, 2001; Schumm et al., 2006). Tectonic activity
disrupts drainage networks. Studying the nature of this disruption can
give clues about the magnitude and orientation of the original tectonic
activity (Gloaguen et al., 2007, 2008; Kurz et al., 2007).
Different software tools exist for a wide range of tectonic
geomorphological analyses, TecDEM is the rst attempt to provide
a single software system that can execute most of the commonly used
analysis techniques. This work is the rst installment of a two-part
series on TecDEM, a MATLAB based software for understanding
tectonics from digital elevation models (DEMs). TecDEM is also able
to generate stream proles, determine ow directions, delineate
watersheds, select knickpoints, and calculate Hack indexes.
The gradient of bedrock channels is intimately linked to the
underlying geology and local tectonics (Kirby and Whipple, 2001;
Schoenbohm et al., 2004). This relationship can be exploited to extract
information regarding lithology or tectonic movements using bedrock

Code available from server at or at
 Corresponding author. Tel.: +49 3731 44 59 29.
E-mail addresses: (F. Shahzad), (R. Gloaguen).

0098-3004/$ - see front matter & 2010 Elsevier Ltd. All rights reserved.

channels as a proxy. We have developed a method for calculating

concavity y and steepness (ks) indices for each stream within a basin
and also for the spatial distribution of these streams. The Kaghan
valley in northern Pakistan was used as a case study in order to test
this method. Stream prole analyses and knickpoint identication
were performed on a DEM of the Kaghan valley to evaluate the utility
of TecDEM and to explore the tectonic evolution of the region.

2. Methodology
The choice of DEM preprocessing and stream extraction algorithms can inuence stream parameters such as contributing area,
slope, elevation, downstream distance and Strahler order and thus
the analysis of geomorphic parameters. Here, we present algorithms for drainage network partitioning using the stream Strahler
(1957) order and stream prole analysis using lled DEMs
(Planchon and Darboux, 2002). A CSA threshold dened by a trial
and error procedure is used for drainage network delineation.
2.1. Drainage network preprocessing
A DEM is a representation of topography as a nite set of points.
Miliaresis (2001, 2008) provides an overview the various either
continuous or discontinuous terrain partition schemes. Drainage
network preparation consists of dividing a DEM into regions
depending on shared characteristics (Arge et al., 2003; Kiss,
2004; Lindsay, 2005). Here, we divide it into three subsections
as outlined below. An overview of our approach can be found as a
data ow diagram in Fig. 1(a).

F. Shahzad, R. Gloaguen / Computers & Geosciences 37 (2011) 250260


Fig. 1. (a) Simplied ow chart for drainage network preparation and (b) calculation of concavity, steepness and Hack indices.

2.1.1. Flow directions and contributing area

For any DEM, ow directions represent the surcial movement
of water to neighboring cells. A wealth of theoretical and algorithmic development in ow directions has been carried out in the
last three decades. These methods are usually based upon hydrological approaches i.e. using upslope areas. The most famous and
basic models for ow direction calculation are called deterministic
ow direction (D8) or single ow direction (SFD) (Arge et al., 2003;
Fehr et al., 2009; Jana et al., 2007; Kiss, 2004; OCallaghan and Mark,
In this study we modied a MATLAB based robust code written
by Schwanghart and Kuhn (2009) to calculate D8 ow. This
program only works for small data sets. We proposed a gridding
approach for calculating the ow direction for large data sets
greater than 500  500 pixels. First, all subgrids are calculated by
dividing the data size (no. of rows and columns) by 500. A unique
linear index-based id is assigned to each subgrid and then bounding
limits are computed. Each subset is processed to calculate the ow
direction with a buffer value of 50 pixels such that the boundary
effect of ow directions can be avoided. The calculated ow
directions for each subgrid are updated in the flowang matrix.
This matrix contains ow angle codes for each pixel (Jenson and
Domingue, 1988; Schwanghart and Kuhn, 2009). Another matrix
flowdir, of similar size to flowang, is used in order to store the
(geographic) direction of ow. The flowang matrix is processed
using a moving window of 3  3 pixel to identify the linear indices
of each pixels. These linear indices are stored in the flowdir matrix.
Similarly, a concavity matrix tzero represents the total number of
inow directions for each pixel of the DEM.

2.1.2. Drainage network delineation

Drainage network delineation consists of two steps: identify all
streams above a critical source area (CSA) (Tarboton et al., 1991)
and then assign their respective Strahler orders. Algorithms 1 and 2
represent the pseudocode for the preparation of drainage networks. The rst algorithm takes only three input parameters: area,
flowdir and CSA. This algorithm creates two data structures:
str_net and netwk_order_ind. The rst structure stores the

stream network with a unique id, its spatial location and Strahler
order. The second structure is used to store the indices of all the
streams of specic orders, i.e. netwk_order_ind(od). CSA is
used to remove all locations in the area matrix that are the
consequence of the hill slope effect (Tarboton et al., 1991). This
step produces a binary matrix parea with high bits representing
all locations in area above CSA. Another matrix str_map represents all the locations with area values equal to 1. In the
next step, this binary drainage network is vectorized and their
respective Strahler orders (Garbrecht and Martz, 1997; Gleyzer
et al., 2004) are assigned. Stream Strahler order are assigned as
illustrated in Fig. 2.
Algorithm 1. Algorithm to prepare drainage network with CSA as a
Require: area, owdir, and CSA
str_net structure (id,rowid,colid,order),
netwk_order_ind structure(ind), noval 1, i1
r size(owdir), area(area o CSA) 0
area(area Z CSA) 1, parea area, str_map noval * parea
while i do
to owdir(str_map noval)
pzero zeros(r)
for i1 to lengthto do
if to(i) a1 then
pzero(to(i)) pzero(to(i)) +1
end if
end for
nid nd(pzero 0)
if notisempty(nid) then
[str_net, netid, str_map] prepare_network(str_net,
str_map, pzero, owdir, nid, i)
netwk_order_ind(i).ind netid, i i + 1
end if
end while
return str_net, netwk_order_ind, str_map


F. Shahzad, R. Gloaguen / Computers & Geosciences 37 (2011) 250260

Fig. 2. Simplied illustration for assigning stream Strahler orders (see text for details): (a) Strahler order 1 streams are highlighted, (b) Strahler order 2 streams are highlighted,
(c) Strahler order 3 streams are highlighted and (d) Complete drainage network with respective Strahler order.

Algorithm 2. Algorithm to describe the procedure prepare_network

Require: str_net, str_map, pzero, owdir, nid, in
outid [], netid []
for i1 to length(nid) do
str_map(nid(i)) in, outid [outid; nid(i)], id
if id a1 then
id2 pzero(nid(i))
end if
while and(id2 1, id a 1) do
str_map(id) in, outid [outid; id], id owdir(id)
if id a1 then
id2 pzero(id), str_map(id) in, tid id
end if
end while
if and(length(outid) 4 1, tid a 1) then
outid [outid; tid]
outid [outid; owdir(tid)]
end if

srid length(str_net)+1, str_net(srid).id i

str_net(srid).rowid r, str_net(srid).colid c
str_net(srid).order in, netid [netid srid], outid []
end for
return str_net, netid, str_map

For this purpose, rst the pzero matrix is prepared to represent

the number of inows for all the pixels where str_map is equal to  1.
The procedure prepare_network as shown in Algorithm 2 is called,
when all pixels have been assigned a Strahler order and no location is
equal to  1. This algorithm requires six input parameters (str_net,
str_map, pzero, flowdir, nid and in), where nid represents the
starting location of all the streams of Strahler order in. Stream
segments of Strahler order in are identied using the flowdir matrix
and terminates at locations where pzero is greater than 1. This loop is
repeated until all the stream segments of order in are successfully
identied. The prepare_network function returns three parameters:
str_net, netid and str_map. The netid is an array containing the
indices of all the streams of Strahler order in and is assigned in
netwk_order_ind structure. This algorithm returns three parameters (str_net, netwk_order_ind, str_map), where str_map
contains a spatial distribution of stream Strahler orders.

F. Shahzad, R. Gloaguen / Computers & Geosciences 37 (2011) 250260

2.1.3. Watershed extraction

The watershed/drainage partition framework is implemented in
the TecDEM (Curkendall et al., 2003; Fehr et al., 2009; Jenson
and Domingue, 1988; Miliaresis, 2001, 2008; Ruiz et al., 2007;
Turcotte et al., 2001). The drainage basin/watershed objects
are labelled according to the Strahler order labeling scheme.
This is a 2 step procedure from the algorithmic point of view: (1)
tracing a unique ow code for each pixel and (2) assigning a unique
identication to all the pixels above a certain required threshold. A
graphical illustration of this methodology is shown in Fig. 3.
Algorithm 3. Algorithm to extract drainage basins of specic
Strahler order
Require: netwk_order_ind, str_net, str_map, td
bsngrd str_map,
for k 1:1:length(netwk_order_ind) do
strid netwk_order_ind(k).ind;
for j 1:1:length(strid) do
r str_net(strid(j)).rowid, c str_net(strid(j)).colid
bsngrd(r, c) k + i*strid(j);
end for
end for
to nd(tzero 0)


for a 1:1:length(to) do
ind owdir(to(a)), output to(a)
while and(ind a 1, bsngrd(ind) 0) do
output [output; ind]
if ind a owdir(owdir(ind)) then
ind owdir(ind)
end if
end while
if owdir(output(end)) a  1 then
bsngrd(output) bsngrd(owdir(output(end)));
bsngrd(output) bsngrd(output(end));
end if
end for
catchment_matrix(bsngrd, td)

These procedures have been shown in Algorithms 3 and 4. The rst

algorithm takes only three input parameters (str_net, netwk_order_ind, str_map). This algorithm creates a variable bsngrd which is
initialized with str_map. Contrary to previous methods, we use an
indexing code to identify unique basins. The idea is to use a complex
number (composed of a real and an imaginary part) for drainage

Fig. 3. Simplied illustration for drainage basins extraction (see text for details): (a) Drainage Basins of Strahler order 1, (b) Drainage Basins of Strahler order 1 and 2,
(c) Drainage Basins of Strahler order 1, 2 and 3 and (d) Full drainage basin of desired Strahler order (4 in this case).


F. Shahzad, R. Gloaguen / Computers & Geosciences 37 (2011) 250260

network representation. The real part of this number corresponds to the

Strahler order and an imaginary part stores the node id for a given
location. It can be easily conducted using a pair of nested loops. The
outer loop traverses netwk_order_ind to nd indices of stream
segments of respective Strahler orders. The inner loop operates on the
nodes of stream segments and the node id is assigned to the imaginary
part. This process assigns an indexing code for all the pixels above the
CSA value. Thus in the next step, this algorithm assigns code to
remaining pixels using the tzero matrix which contains information
about all inward owing drainage codes for each pixel. Grid points with
no inow (i.e. tzero 0) are the local elevation maxima and represent
the starting points (seeds) into the algorithm that delineate drainage
basins. Each seeding pixel is then traced down until the end of the hill
slope. This limit is identied on the pixels of bsngrd 0. All streams on
the hill slope are also marked with the Strahler order 1 as they are all
the part of the order 1 basin. Once all the respective sub-basins are
identied they are merged to form a unique basin that are based on the
user-dened drainage basin.
Algorithm 4. Algorithm to describe the catchment_matrix
Require: bsngrd, td, netwk_order_ind, str_net
for ord 1:1:td-1 do
strid netwk_order_ind(ord).ind
for kk 1:1:length(strid) do
if str_net(strid(kk)).order ord then
r1 str_net(strid(kk)).rowid(end)
c1 str_net(strid(kk)).colid(end)
bsngrd(imag(bsngrd) strid(kk)) bsngrd(r1,c1)
end if
end for
end for
uids unique(imag(bsngrd(real(bsngrd) td)))
basinmatrix zeros(size(bsngrd))
for ij 1:1:length(uids) do
basinmatrix(imag(bsngrd) uids(ij)) ij
end for
return basinmatrix

2000; Wobus et al., 2006). In this regard different spatially

distributed streams are identied for stream prole analysis. These
streams of different spatial distribution have elevation, length,
contributing area and spatial locations, i.e. latitude and longitude
information. This data is obtained by processing the DEM, flowdir,
area, and flowlength grids and is processed using procedure
shown in Fig. 1(b). The following sections provide a theoretical
overview of these measures and how they are calculated.
2.2.1. Concavity and steepness index
The bedrock incision model states that due to the equal stream
gradients for erosion and uplift detachment-limited, channels do
not have a continuous cover of alluvial sediments even at negligible
ow levels (Shahzad et al., 2009; Snyder et al., 2000; Wobus et al.,
2006). Stream morphology can be represented by three different
stages: initial steady state, transient and nal steady-state prole.
This transition reects lithological contrasts or fault boundaries
that set the streams to a new equilibrium condition as shown in
Fig. 4. The shear stress incision law states that under steady-state
conditions the upstream contributing area (A) and slope (S) of a
stream at any stage can be represented using
S ks Ay

where y and ks are concavity and steepness indices, respectively.

These values depend on basin morphology, underlying rock
strengths and hydraulic geometry. They can be measured directly
by regression analysis between A and S (Montgomery et al., 1996;
Snyder et al., 2000; Wobus et al., 2006). Fig. 4 shows that the log
log plot between area (A) and slope (S) separates the three different
stages of a stream. These stages are usually separated by trends in
the loglog plot. Steam units with lithological contrasts and fault
boundaries are delineated using the concavity and steepness
indices. The normalized steepness index (ksn) is calculated using

The catchment_matrix algorithm takes four input arguments:

bsngrd, td, str_net, netwk_order_ind and str_map. At this stage
bsngrd is a complex matrix whose real part consists of the respective
Strahler order and whose imaginary part denotes the respective
indices of stream segments. In this algorithm td is the threshold limit
at which a drainage network is required. A set of nested loops is used
to traverse all pixels until a pixel of desired Strahler order (td) is
encountered. At each iteration, the location of stream segments of
order ord in the bsngrd matrix is updated to the indexing code of the
last element of that segment. In the next step, unique pixel ids of each
basin are identied. A new matrix basinmatrix equal to the size of
bsngrd is created and all elements are set to zero. A variable uids
consists of unique elements of all imaginary parts of bsngrd, where
the real part of bsngrd is equal to td. This ensures the extraction of
unique ids of basins. Now the imaginary part of bsngrd matrix
consists of unique basin ids and hence a loop is operated on all
elements of uids to store them in basinmatrix. A tracing algorithm
using eight connected neighbors was also implemented to trace the
boundary of the basins. Beyond the extraction process, additional
parameters like hypsometric integral and basin elongation ratios can
also be calculated for each basins.
2.2. Stream prole analysis
Stream prole analysis is a quantitative geomorphic approach
to describe stream morphology. This involves calculating the Hack
(1973) SL index and concavity and steepness indices (Snyder et al.,

Fig. 4. Transient stream prole is showing a relationship between low uplift and
high uplift along migration of knickpoint. Inset shows a logarithmic plot between
stream slope and upstream contributing area. It shows that concavity index y
remains same for both initial and nal proles, while steepness index (ks) is higher
for nal prole. Modied from Shahzad et al. (2009) and Snyder et al. (2000).

F. Shahzad, R. Gloaguen / Computers & Geosciences 37 (2011) 250260

a x reference concavity value yref usually taken around 0.45

(Snyder et al., 2000; Wobus et al., 2003, 2006). The yref is used to
interpret steepness values as they are strongly correlated (Eq. (1)).
The normalized steepness index (ksn) can be used to calculate
relative uplift rates using
U knsn K

where K is the erosion coefcient, n depends upon basin morphology and U is relative uplift rates. This equation gives us relative
uplift rate for area within a steady-state landscape by choosing
appropriate values of n and K which can be found from previous
studies (Anderson et al., 1994; Seidl and Dietrich, 1992; Tucker and
Slingerland, 1996; Wobus et al., 2006). The calculation procedure is

Fig. 5. Graphical illustration of Hack Index at specied contour intervals in a stream

prole. Modied from Hack (1973).


shown in Fig. 1(b). First, the desired stream is smoothed using a

moving window lter along the prole in order to remove high
frequency noise evident in global DEMs. Trends can then be
selected for the desired stream and the choice of which varies
from stream to stream. Regression analysis is applied to each trend
to derive concavity and steepness indices. A normalized steepness
index is then calculated for each trend using the reference
concavity. Over a region of constant K the relative uplift rates
are obtained using Eq. (2). This procedure is repeated for all streams
in the study area.

2.2.2. Hack index

The Hack index can be calculated using Eq. (3) as shown in Fig. 5.
Hack (1973) proposed this method by studying the change in
stream length and channel slope using semi-log plots. He proposed
a mathematical relationship as

SL k Ln
where H is elevation and L is stream length. The vertical linear axis
represents elevation whereas the horizontal logarithmic axis
indicates stream length. The slope of this graph is a straight line
and is called Hack index or the stream gradient index (SL).
Calculation of the SL index is simple and can be applied to any
longitudinal stream prole using a user-dened contour interval.
First, the desired stream is partitioned into several segments/
reaches using the specied contour interval. The distance and
elevation difference between two consecutive reaches and the
distance between the center of these reaches are used to calculate

Fig. 6. (a) Tectonic setting of India Eurasia collision zone (Kamp et al., 2008; Shahzad et al., 2010), (b) Geographical location of study area (Kamp et al., 2008; Shahzad et al.,
2010) and (c) Kaghan valley and surrounding area with major tectonic features (Kamp et al., 2008; Kazmi and Jan, 1997; Monalisa et al., 2007; Shahzad et al., 2007).


F. Shahzad, R. Gloaguen / Computers & Geosciences 37 (2011) 250260

this measure. Change in SL values along a stream corresponds to

changes in lithologies and the presence of faults.

3. Testing and evaluation in an active tectonic region

The Kaghan valley is an active geomorphic feature which lies in
northern Pakistan. Valley drainage is dominated by the Kunhar
River, also known as Kaghan River. Geographically, most of the
study area lies in Pakistani Kashmir and was severely damaged
during the October 8, 2005 earthquake. The elevation of this region
varies mainly between 600 and 5000 m. Tectonically, the valley is
located in the Hazara Kashmir Syntaxis (HKS) which is an active
part of the NW Himalayas. Previous studies suggest that this region
is under considerable crustal shortening and uplift (Hussain and
Khan, 1996; Kamp et al., 2008; Kazmi and Jan, 1997). The HKS was
formed as a hair-pin structure consisting of the NNW-SSE trending
Main Boundary Thrust (MBT) and its splays. The outer boundary of
the HKS is represented by the Punjal Khairabad Fault which has a
NE-SW orientation near Kaghan (Kamp et al., 2008; Kazmi and Jan,
1997; Shahzad et al., 2007). An overview of the geology, geomorphology and climatology of the region can be found in Kamp et al.
(2008) and Kazmi and Jan (1997).
We prepared the drainage network of the Kaghan valley and
surrounding area using 90 m Shuttle Radar Topography Mission
Data (SRTM-DEM) (Farr et al., 2007). A list of freely available DEMs
and their sources is given in Appendix B. The drainage network of

the study area with the streams of Strahler orders greater than
4 and the drainage basin of the Kunhar river is shown in Fig. 6(c).
A total of 22 streams were selected in the Kunhar river drainage
basin. A simplied user manual is given in Appendix A. These
streams are extracted from the source to their conuence point
with the main channel. The major lithological units in the study
area are Tertiary sedimentary rocks (Kamp et al., 2008; Kazmi and
Jan, 1997). The area was selected because it is undergoing variable
surface deformation conditions. Stream prole analysis was
applied to selected streams as shown in Fig. 8. This type of analysis
investigates the concavity, stream gradient and steepness of the
region underlying any stream and can be investigated in detail
using their spatial distribution in map view (Shahzad et al., 2007).
We use a reference concavity of yref 0:45 as suggested by
Schoenbohm et al. (2004) and Snyder et al. (2000). Proles consist
of one to several channel segments with distinct concavity and
steepness indices. The selection of stream segments depends upon
stream morphology.
Fig. 7 shows the stream prole analysis of stream no. 3. The
logarealogslope plot shows three prominent trends. We selected
two concave trends to calculate their concavity and normalized
steepness (Schoenbohm et al., 2004). The convex trend is not
analyzed here but can be interpreted separately (Kirby and
Whipple, 2001). Both concave trends are marked with different
colors and are also visible in the longitudinal prole. The starting
portion of this stream before the rst trend represents the hill slope
effect. According to Schoenbohm et al. (2004), this type of stream

Fig. 7. Concavity and Steepness analysis of stream no. 3. Two concave trends have been identied on logarealogslope data (bottom). These trends also appear on longitudinal
prole (upper). Green line represents area prole of stream. Selected streams with unique ids are shown in Fig. 8. (For interpretation of the references to color in this gure
legend, the reader is referred to the web version of this article.)

F. Shahzad, R. Gloaguen / Computers & Geosciences 37 (2011) 250260

represents an area where the intermediate channel segment has

been removed by headward erosion. The lower segment is usually
set in response to an earlier local base level related to the paleoriver. The portion of this prole where slope does not change,
normally dictates areas of debris ow or landslide. The rst trend
has a very high concavity value (2.16) and a low steepness (103.12)
which indicates the presence of relict landscape. The lower
segment gives lower concavity (0.67) and high steepness
(936.14) values for the downstream section of the river. The
sudden change in geomorphic indices, especially increased steepness indices are attributed to regions of rapid uplift.
We observe that streams outside the HKS have convex behavior,
represented by a high concavity index (see Fig. 8 (a)). Inside the
Hazara Kashmir Syntaxis which is delineated by the Punjal
Khariabad Fault (PKF), streams show a low concavity index, which
is attributed to increasingly incisional conditions. Another reason
for the presence of highly concave channels outside of the Hazara
Kashmir Syntaxis may be because this area is compressed between
the PKF and the Main Mantle Thrust (MMT). This also supports the
idea that the spatial distribution of concavity index can be used to
delineate variable steepness zones even though there is no
statistical signicance of concavity index between channels in
the low and high steepness zones. As the steepness of a region is
attributed to the uplift prevailing conditions, the plan view
distribution of normalized steepness indices for all the tributaries
in a catchment is a useful tool to identify regions of rapid uplift. In
the present study there is no clear steepness distribution trend as
shown in Fig. 8(b) except for the central portion with a high
steepness index along the PKF. This area is sandwiched between
accommodating shear zones (PKF and MBT) and can be one
explanation for these high values.


In the study area, the Hack Index was applied on a contour

interval of 300 m. The resultant values range between 1 and
1552 m and are grouped into ve classes as shown in Fig. 8(c).
As with the steepness index, Hack values are also spatially
distributed. This change in sudden variation is attributed to
variable lithological units (Hussain and Khan, 1996; Kamp et al.,
2008; Kazmi and Jan, 1997). The second observation is that the
Hack index shows sharp changes close to faults and/or along knick
points. Inside the Hazaral Kashmir Syntaxis the Hack index has
relatively low values. This may also be attributed to the fact that the
downstream section of the Kunhar River is fully equilibrated. These
values also suggest that along with tectonics, lithology is playing a
major role in forming the landscape. In the northern portion higher
values also suggest that the increased topography is disturbing the
streams and producing higher slopes. The results from these
analyses suggest that tectonic deformation is unevenly distributed.
We identify two zones of variable deformation in the study area.
Inside the Hazara Kashmir Syntaxis we observe a zone of rapid
uplift whilst the deformation outside of the Hazara Kashmir
Syntaxis can be attributed to sandwiching between the Main
Mantle Thrust and Punjal Khairabad Fault.

4. Concluding remarks
TecDEM is a valuable new software tool for the processing of
DEM data. Drainage basin partitioning from DEMs is a fundamental
processing option of TecDEM. The presented algorithms assign
Strahler orders to each stream and extract sub-basins. Stream
prole analysis of selected streams reveals the spatial distribution
of concavity, steepness and Hack indices. The quantitative

Fig. 8. Map view of spatial distribution of geomorphic indices. Numbers correspond to unique ids for selected streams: (a) Concavity map, (b) steepness map and (c) Hack
Index map.


F. Shahzad, R. Gloaguen / Computers & Geosciences 37 (2011) 250260

representation of drainage systems, sub-basins, knick points, etc. is

exported in shape les and ENVI headers. Users can write their own
MATLAB functions in order to expand the software capabilities. The
software is available from the IAMG website and uses Global DEMs.
This provides new opportunities for education and research in
tectonic geomorphology. We have tested TecDEM in an investigation of the tectonic geomorphology of the Kanhar valley in Pakistan.
The results conform well with existing morphotectonic/geomorphologic knowledge of the area. Stream prole analysis identied
two distinct zones of variable surface deformation marked by the
Punjal Khairabad Fault. Deformation of the area outside the HKS
has resulted from sandwiching between the Punjal Khairabad Fault
and the Main Mantle Thrust in a zone of convergence.

Financial support to Faisal Shahzad from the State Government
of Saxony (Germany), German Academic Exchange Association
(DAAD) and graduate student research grant for year 2008 from the
International Association for Mathematical Geosciences (IAMG) is
gratefully acknowledged. We thank George Miliaresis and an
anonymous reviewer who helped us to improve the quality and
presentation of this paper series. Anja Bretzler and Adam Szulc are
acknowledged for help in proof reading and Louis Andreani for his
support in GIS matters.

Fig. 9. Screenshot of the TecDEM startup window.

A.2. Process
Appendix A. TecDEM user guide
This software has been written in MATLAB (release 2008b and
2009b) using the Mapping toolbox and has been tested on
Windows XP, Linux and MacOS. In order to run the software
properly MATLAB must be running with current path set to the
provided folder TecDEM 1.0. Source code has been organized into
three folders: Extraction, Methods and Drainage. The Extraction
folder contains the code to extract drainage networks from the
DEM while the other two folders contain the code for stream prole
analysis, spatial statistics and basin analysis. When the user runs
the TecDEM.m le all code in the sub-folders will be automatically
congured to work efciently. TecDEM consists of a graphical user
interface (GUI) as shown in Fig. 9. This GUI is organized into one
text box and six menus: File, Prepare, Display, Analyze, Results and
Help. The text box is used to record the log of processes and will be
constantly updated. This box will provide information about the
start and end of any process and can be saved for future references.
The following sub-sections provide an overview about software
usage for drainage network partitioning and stream prole analysis. Details concerning the use of the software can also be found in
the accompanying user guide.
A.1. File menu
The File menu is used for data handling. It provides functions for
the import and export of data in a variety of formats. Data handling
is carried out in native MATLAB les (n.mat). The import DEM
submenu is used to import the lled DEM in GEOTIFF format. The
location of the DEM le is set as the working and result directory for
the current project. Two les (n_INFO.mat and n_DEM.mat) are
automatically created and placed in the current working directory.
The  denotes the project name specied by the DEM le name. The
Open Project sub-menu is used to open those projects, which have
been fully or partially processed in TecDEM. Settings from previous
computations are automatically loaded when a user loads an
existing project. The export sub-menu is used to export the grids
in n.HDR and vectors in n.SHP le formats.

The Process menu consists of commands for drainage preparation. The Flow Direction (D8) sub-menu performs the D8 owrouting algorithm on the DEM using a gridding approach. This
function will route the ow at each pixel location to the eight
possible adjacent cells. The Link File sub-menu will create a ow
link between each pixel using their ow directions. This will create
a n_FLOW.mat le which contains the linear indices for the inow
direction of each pixel. The Contributing Area sub-menu will
calculate the contributing area at each pixel and stores it
in n_AREA.mat. It uses a linking approach and calculates the
cumulative sum for each pixels ow to a neighboring pixel. The
Drainage Network sub-menu requires a CSA value (usually 1 km
km2) to remove the hillside effect. It saves the drainage network as
a structure consisting of stream segments along with their respective Strahler order in n_ADN.mat le. The watershed extraction submenu is used to extract drainage basins of specic Strahler order.
This type of drainage extraction is usually useful for drainage
system visualization as well as basin analysis (Shahzad and
Gloaguen, in press).

A.3. Display
The display menu is used not only to display the DEM, drainage
networks, and watersheds but is also used to select the individual
streams for stream prole analysis. When the data is displayed it
shows the stream extraction interface. This module consists of
three menus: Plot, Edit and Extract. The Plot sub-menu allows us to
change the base plot between DEM and extracted drainage network
at variable Strahler orders. The extract sub-menu is used to identify
the desired stream. The save stream command will save the stream
into stream data structure and is saved in a n_stream.mat le. Each
stream is assigned a unique id as shown in a list box on the right
hand side. When all desired streams have been extracted and saved
the edit menu can be used to format the data if desired. This menu
allows a user to delete a desired stream or subtract one stream from
another. The Subtract sub-menu is used to subtract streams with
similar drainage outlet in order to remove redundant data due to

F. Shahzad, R. Gloaguen / Computers & Geosciences 37 (2011) 250260

drainage overlapping. Stream selection procedure requires a good

knowledge of the study area. One can select as many streams as
required by keeping in view the local tectonic setting.
A.4. Analyze
The Analyze menu of TecDEM consists of three sub-menus and
here we only discuss the stream prole sub-menu. Details about
the other two can be found in the second part of this paper series
(Shahzad and Gloaguen, in press). The Knick point Selection submenu will display a GUI to Get, Save and Delete Knickpoints. The
Get Knickpoint button allows the user to select Knickpoints and
these can be saved using the Save button. Identied Knickpoints
will be denoted by a unique id, so that the user can delete specic
Knickpoints if required. The scrolling bar on the left hand side
allows the user to pass though different proles. The second submenu displays a new window for concavity and steepness analysis.
This new window consists of three sub-menus: Plot, Trends and
Results. The right trend selection is very important for this analysis.
The Plot menu allows us to switch between different plot types for
trend selection. The user has exibility to change the trend colors
using the Color Coding submenu. The Trends menu is used to select
and delete different trends. Trend selection requires the lower and
upper bound of the data range using two mouse clicks. Once the
trend is selected a message box will display the summary of
geomorphic indices. The delete trend sub-menu will delete a
specic trend. After deleting the trend the user can select the
trend again if required. The Result menu will provide the user with
the results calculated for the current stream. The Hack Index submenu will ask the user to input the contour interval for calculation.
This calculation is discussed in the methodology section and will
calculate the Hack Index for all the streams automatically. All the
results will be updated in the n_stream.mat le.

Appendix B. Data sources

TecDEM is expected to support geologists in applying complex
tectonic geomorphology tasks and morphotectonic analysis from
global DEMs (SRTM DEM-1, ASTER GDEM-2, GLOBE DEM-3) that
are freely available from the WEB at various scales and resolutions.
These data sets provide new possibilities for applying digital
geologic mapping and tectonic interpretation. Here is a short list
of websites providing free data sources.
1. (90 m DEM grid).
2. (30 m DEM grid).
3. (1 km DEM grid).

Anderson, R., Dick, G., Densmore, A., 1994. Sediment uxes from model and real
bedrock-channeled catchments: responses to baselevel, knickpoint and channel
network evolution. Geological Society of America Abstracts with Programs 26,
Arge, L., Chase, J.S., Halpin, P., Toma, L., Vitter, J.S., Urban, D., Wickremesinghe, R.,
2003. Efcient ow computation on massive grid terrain datasets. Geoinformatica 7 (42), 283313.
Curkendall, D.W., Fielding, E.J., Cheng, T., Pohl, J.M., 2003. A computational-grid
based system for continental drainage network extraction using SRTM digital
elevation models. In: Proceedings of the 2003 International Conference on
Parallel Processing Workshops (ICPPWO 03), Kaohsiung, Taiwan, pp. 181190.
Farr, T.G., Rose, P.A., Caro, E., Crippen, R., Duren, R., Hensley, S., Kobrick, M., Paller, M.,
Rodriguez, E., Roth, L., Seal, D., Shaffer, S., Shimada, J., Umland, J., Werner, M.,
Oskin, M., Burbank, D., Alsdorf, D., 2007. The shuttle radar topography mission.
Reviews of Geophysics 45, RG2004 . doi:10.1029/2005RG000183.
Fehr, E., Andrade, J.S., Cunha, S.D., Silva, L.R., Herrmann, H.J., Kadau, D., Moukarzel,
C.F., Oliveira, E.A., 2009. New efcient methods for calculating watersheds.


Journal of Statistical Mechanics: Theory and Experiments September, PO9007,

Garbrecht, J., Martz, L.W., 1997. Automated channel ordering and node indexing for
raster channel networks. Computers & Geosciences 9 (6), 961966.
Gleyzer, A., Denisyuk, M., Rimmer, A., Salingar, Y., 2004. A fast recursive GIS algorithm
for computing Strahler stream order in braided and nonbraided networks. Journal
of the American Water Resources Association 40 (4), 937946.
Gloaguen, R., Kaessner, A., Wobbe, F., Shahzad, F., Mahmood, S.A., 2008. Remote
sensing analysis of crustal deformation using river networks. In: IEEE
International Geosciences and Remote Sensing Symposium, Boston, USA,
pp. IV-1IV-4.
Gloaguen, R., Marpu, P.R., Niemeyer, I., 2007. Automatic extraction of faults and
fractal analysis from remote sensing data. Nonlinear Processes in Geophysics
14 (2), 131138.
Hack, J.T., 1973. Stream-prole analysis and stream-gradient index. U.S. Geological
Survey Journal of Research 1 (4), 421429.
Hussain, A., Khan, R., 1996. Geological map of Azad Jammu and Kashmir. Geological
Map Series. Geological Survey of Pakistan, Islamabad.
Jana, R., Reshmidevi, T.V., Arun, P.S., Eldho, T.I., 2007. An enhanced technique in
construction of the discrete drainage network from low-resolution spatial
database. Computers & Geosciences 33 (6), 717727.
Jenson, S.K., Domingue, J.O., 1988. Extracting topographic structure from digital
elevation data for Geographic Information System analysis. Photogrammetric
Engineering and Remote Sensing 54 (11), 15931600.
Kamp, U., Growley, B.J., Khattak, G.A., Owen, L.A., 2008. GIS-based landslide
susceptibility mapping for the 2005 Kashmir earthquake region. Geomorphology 101 (4), 631642.
Kazmi, A.H., Jan, M.Q., 1997. Geology and Tectonics of Pakistan. Graphic Publishers,
Karachi, Pakistan 554pp.
Kirby, E., Whipple, K., 2001. Quantifying differential rock-uplift rates via stream
prole analysis. Geology 29 (5), 415418.
Kiss, R., 2004. Determination of drainage network in digital elevation models,
utilities and limitations. Journal of Hungarian Geomathematics 2, 1629.
Kurz, T., Gloaguen, R., Ebinger, C., Casey, M., Abebe, B., 2007. Deformation
distribution and type in the Main Ethiopian Rift (MER): a remote sensing study.
Journal of African Earth Sciences 48 (23), 100114.
Lindsay, J.B., 2005. The Terrain Analysis System: a tool for hydro-geomorphic
applications. Hydrological Process 19 (5), 11231130.
Miliaresis, G., 2001. Extraction of Bajadas from digital elevation models and satellite
imagery. Computers & Geosciences 27 (10), 11571167.
Miliaresis, G., 2008. Quantication of terrain processes. In: Zhou, Q., Lees, B., Tang, G.
(Eds.), Advances in Digital Terrain Analysis. Springer-Verlag, Berlin, Heidelberg,
pp. 1328.
Monalisa, Khawaja, A.A., Jan, M.Q., 2007. Seismic hazard assessment of the NW
himalayan fold-and-thrust belt, Pakistan, using probabilistic approach. Journal
of Earthquake Engineering 11 (2), 257301.
Montgomery, D.R., Abbe, T.B., Bufngton, J.M., Peterson, N.P., Schmidt, K.M., Stock,
J.D., 1996. Distribution of bedrock and alluvial channels in forested mountain
drainage basins. Nature 381, 587589.
OCallaghan, J., Mark, D., 1984. The extraction of drainage networks from digital
elevation data. Computer Vision, Graphics and Image Processing 28 (3),
Planchon, O., Darboux, F., 2002. A fast, simple and versatile algorithm to ll the
depressions of digital elevation models. Catena 46 (2), 159176.
Ruiz, V.O., Llorente, J.I.G., Lechon, N.S., Vilda, P.G., 2007. An improved watershed
algorithm based on efcient computation of shortest paths. Pattern Recognition
40 (3), 10781090.
Schoenbohm, L., Whipple, K., Burchel, B., Chen, L., 2004. Geomorphic constraints on
surface uplift, exhumation, and plateau growth in the Red River region, Yunnan
Province, China. Bulletin of the Geological Society of America 116 (78),
Schumm, S.A., Dumont, J.F., Holbrook, J.M., 2006. Active Tectonics and Alluvial
Rivers. Cambridge University Press, Cambridge 292pp.
Schwanghart, W., Kuhn, N.J., 2010. TopoToolbox: a set of Matlab functions for
topographic analysis. Environmental Modelling & Software 25, 770781.
Seidl, M.A., Dietrich, W.E., 1992. The problem of channel erosion into bedrock.
Catena Supplement 23, 101124.
Shahzad, F., Gloaguen, R. TecDEM: a new tool for tectonic geomorphology, part 2: surface
dynamics and basin analysis. Computers & Geosciences, in press, doi:10.1016/
Shahzad, F., Mahmood, S., Gloaguen, R., 2007. Stream prole and neotectonic
analysis in Hazara Kashmir Syntaxis using shuttle radar digital elevation data.
In: Proceedings 3rd IEEE International Conference on Emerging Technologies,
Islamabad, Pakistan, pp. 16.
Shahzad, F., Mahmood, S.A., Gloaguen, R., 2009. Drainage network and lineament
analysis: an approach for Potwar Plateau (northern Pakistan). Journal of
Mountain Sciences 6 (1), 1424.
Shahzad, F., Mahmood, S.A., Gloaguen, R., 2010. Nonlinear analysis of drainage
systems to examine surface deformation: an example from Potwar Plateau
(northern Pakistan). Nonlinear Processes in Geophysics 17 (2), 137147.
Snyder, N., Whipple, K., Tucker, G., Merritts, D., 2000. Landscape response to tectonic
forcing: digital elevation model analysis of stream proles in the Mendocino
triple junction region, Northern California. Bulletin of the Geological Society of
America 112 (8), 12501263.
Strahler, A.N., 1957. Quantitative analysis of watershed geomorphology. Transactions of the American Geophysical Union 8 (6), 913920.


F. Shahzad, R. Gloaguen / Computers & Geosciences 37 (2011) 250260

Tarboton, D., Bras, R., Rodriguez-Iturbe, I., 1991. On the extraction of channel
networks from digital elevation data. Hydrological Process 5 (1), 81100.
Tucker, G.E., Slingerland, R., 1996. Predicting sediment ux from fold and thrust
belts. Basin Research 8 (3), 329349.
Turcotte, R., Fortin, J.P., Rousseau, A.N., Massicotte, S., Villeneuve, J.P., 2001. Determination of the drainage structure of a watershed using a digital elevation model and a
digital river and lake network. Journal of Hydrology 240 (34), 225242.

Wobus, C., Whipple, K., Kirby, E., Snyder, N., Johnson, J., Spyropolou, K., Crosby, B.,
Sheehan, D., 2006. Tectonics from topography: Procedures, promise and pitfalls.
In: Willett, S.D., Hovius, N., Brandon, M.T., Fisher, D.M. (Eds.) Tectonics, Climate
and Landscape Evolution, Geological Society of America Special Paper 398,
pp. 5574.
Wobus, C.W., Hodges, K.V., Whipple, K.X., 2003. Has focused denudation sustained
active thrusting at the Himalayan topographic front ? Geology 31 (10), 861864.