*** Note that this file is outdated. Please find TopoToolbox, a Matlab suite of functions for topographic analysis at
https://topotoolbox.wordpress.com/ . wflowacc will be removed from the File Exchange in the future. ****
How much water flows where? Use this algorithm to calculate the upslope area of each cell in a digital elevation model.
- multiple flow direction
- single flow direction
- routes across flats
- calculates deterministic, randomized and random flow
- allows you to specify a weighting exponent that governs the relation flow direction - slope
- handles edge effects
To all: TopoToolbox is now available here: http://physiogeo.unibas.ch/topotoolbox/
TopoToolbox can handle larger grids than wflowacc can and has many more utilities related to digital elevation model analysis.
thanks for your feedback. The code is it stands right now is a multiple flow direction algorithm, and yes, it can be very "dissipative". There is a way to avoid this behavior by element-wise exponentiate the flow direction matrix (M), so that steep gradients gain a larger weight than smaller ones.
I'll work on an update of this version and include it as an additional option.
Thanks a lot again for the feedback.
A good user friendly piece of code. Unfortunately it does not seem to generate single thread 'rivers' 1 cell wide. Instead cells of high accumulation are often adjacent to each other (i.e. perpendicular to the primary flow direction) producing messy flow paths.
you are right. The algorithm is quite memory demanding and grids exceeding 600x600 cells may cause problems. I am currently working on an improved version that allows for huge grids. Please be a bit patient...
Does not work for large rivers
I did not include a fill sinks option as it requires the image processing toolbox. If you have this toolbox use
demfs = imfill(dem,'holes')
Good, but do not have a fill sinks option that would be very useful.
update of the description
an option was added to control flow behavior at grid edges
included single flowdirection and the exponent for flow direction weighting to address the problems encountered by Liam.