File Exchange

image thumbnail


version 2.3.1 (55.3 MB) by Wolfgang Schwanghart
A MATLAB program for the analysis of digital elevation models


Updated 10 Jun 2021

From GitHub

View Version History

View license on GitHub

TopoToolbox provides a set of Matlab functions that support the analysis of relief and flow pathways in digital elevation models. The major aim of TopoToolbox is to offer helpful analytical GIS utilities in a non-GIS environment in order to support the simultaneous application of GIS-specific and other quantitative methods.
TopoToolbox enables calculation of standard terrain attributes such as
- slope
- curvature
- aspect
- local topography
- ...
flow related terrain attributes such as
- drainage basin delineation
- flow accumulation
- flow distance
- ...
stream network analysis such as
- stream order
- slope-area plots
- chiplots
Moreover, TopoToolbox contains several tools to modify stream networks in an automated way and derive swath profiles, among other tools. The algorithms are fast and can thus be used in spatially distributed, dynamic modelling approaches in hydrology, glaciology and geomorphology.

See for examples and instructions.

Cite As

Schwanghart, W., and D. Scherler. “Short Communication: TopoToolbox 2 – MATLAB-Based Software for Topographic Analysis and Modeling in Earth Surface Sciences.” Earth Surface Dynamics, vol. 2, no. 1, Copernicus GmbH, Jan. 2014, pp. 1–7, doi:10.5194/esurf-2-1-2014.

View more styles

Schwanghart, Wolfgang, and Nikolaus J. Kuhn. “TopoToolbox: A Set of Matlab Functions for Topographic Analysis.” Environmental Modelling & Software, vol. 25, no. 6, Elsevier BV, June 2010, pp. 770–81, doi:10.1016/j.envsoft.2009.12.002.

View more styles

Comments and Ratings (24)


Wolfgang, I love you bro' !!!

omid zandi

Paolo Fogliata

Wolfgang Schwanghart

@Anthony: Check my reply to your comment here:
Best, Wolfgang

Anthony Liu

Very useful tool. Just wonder if I have runoff data at each grid, can I use flowacc to create a routing simulation? Thanks.

Jacob Buffo

Excellent tool and incredibly documented! Thanks so much for the upload!

Yuanxu Ma

Wolfgang Schwanghart

@taotao : Thanks! Dirk and I doing our best to keep it updated. In fact, there are some upcoming additions soon. Note that there is also a version with weekly to monthly updates which you can track on github (


fantastic tool for fluvial geomorphology studies. Hope it could be updated year by year.

Ariane Silveira

chengyan liu

chengyan liu

Allan López

I need your kind assistance please for my work in TopoToolBox-TTB: How to "isolate" an island or peninsula so the drainage and other calculations will not become crazy and go inside the sea ( or lakes). I guess with the NaN but that is very complex for me.

Please, mail me to

Erin Seagren

Jack Williams

Absolutely fantastic. Thanks for taking the time to make this.

zh sg

Alberto de la Fuente

kiran gk

How to use this tool box.. help me

Ganquan Mao

Andrea Libri

Chad Greene

These tools are fantastic. Thanks Wolfgang et al. for figuring out how to solve flow problems so efficiently. I also like the of display functions like imageschs which really add context to data.



MATLAB Release Compatibility
Created with R2016a
Compatible with R2014b and later releases
Platform Compatibility
Windows macOS Linux

Inspired: How to estimate subglacial water routes

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!