Frontiers of Earth Science

, Volume 13, Issue 2, pp 317–326 | Cite as

A fast and simple algorithm for calculating flow accumulation matrices from raster digital elevation

  • Guiyun ZhouEmail author
  • Hongqiang Wei
  • Suhua Fu
Research Article


Calculating the flow accumulation matrix is an essential step for many hydrological and topographical analyses. This study gives an overview of the existing algorithms for flow accumulation calculations for single-flow direction matrices. A fast and simple algorithm for calculating flow accumulation matrices is proposed in this study. The algorithm identifies three types of cells in a flow direction matrix: source cells, intersection cells, and interior cells. It traverses all source cells and traces the downstream interior cells of each source cell until an intersection cell is encountered. An intersection cell is treated as an interior cell when its last drainage path is traced and the tracing continues with its downstream cells. Experiments are conducted on thirty datasets with a resolution of 3 m. Compared with the existing algorithms for flow accumulation calculation, the proposed algorithm is easy to implement, runs much faster than existing algorithms, and generally requires less memory space.


flow accumulation flow direction DEM GIS 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.



This work was supported by the National Natural Science Foundation of China (Grant No. 41671427) and the Fundamental Research Funds for the Central Universities (ZYGX2016J148). We thank the anonymous referees for their constructive criticism and comments.


  1. Arge L, Chase J, Halpin P, Toma L, Vitter J, Urban D, Wickremesinghe R (2003). Efficient flow computation on massive grid terrain datasets. GeoInformatica, 7(4): 283313CrossRefGoogle Scholar
  2. Bai R, Li T, Huang Y, Li J, Wang G (2015). An efficient and comprehensive method for drainage network extraction from DEM with billions of pixels using a size-balanced binary search tree. Geomorphology, 238: 5667CrossRefGoogle Scholar
  3. Barnes R (2017). Parallel non-divergent flow accumulation for trillion cell digital elevation models on desktops or clusters. Environ Model Softw, 92: 202212CrossRefGoogle Scholar
  4. Barnes R, Lehman C, Mulla D (2014). An efficient assignment of drainage direction over flat surfaces in raster digital elevation models. Comput Geosci, 62: 128135Google Scholar
  5. Buchanan B P, Nagle G N, Walter M T (2014). Long-term monitoring and assessment of a stream restoration project in central New York. River Res Appl, 30(2): 245258CrossRefGoogle Scholar
  6. Choi Y (2012). A new algorithm to calculate weighted flowaccumulation from a DEM by considering surface and underground stormwater infrastructure. Environ Model Softw, 30: 8191CrossRefGoogle Scholar
  7. Freeman T G (1991). Calculating catchment area with divergent flow based on a regular grid. Comput Geosci, 17(3): 413422CrossRefGoogle Scholar
  8. Fu S, Liu B, Liu H, Xu L (2011). The effect of slope on interrill erosion at short slopes. Catena, 84(1–2): 2934Google Scholar
  9. Garbrecht J, Martz L W (1997). The assignment of drainage direction over flat surfaces in raster digital elevation models. J Hydrol (Amst), 193(1–4): 204213Google Scholar
  10. Jenson S K, Domingue J O (1988). Extracting topographic structure from digital elevation data for geographic information system analysis. Photogramm Eng Remote Sensing, 54(11): 15931600Google Scholar
  11. Jiang L, Tang G, Liu X, Song X, Yang J, Liu K (2013). Parallel contributing area calculation with granularity control on massive grid terrain datasets. Comput Geosci, 60: 7080CrossRefGoogle Scholar
  12. Nardi F, Grimaldi S, Santini M, Petroselli A, Ubertini L (2008). Hydrogeomorphic properties of simulated drainage patterns using digital elevation models: the flat area issue. Hydrol Sci J, 53(6): 11761193CrossRefGoogle Scholar
  13. Nobre A D, Cuartas L A, Hodnett M, Rennó C D, Rodrigues G, Silveira A, Waterloo M, Saleska S (2011). Height above the nearest drainage—a hydrologically relevant new terrain model. J Hydrol (Amst), 404 (1–2): 1329Google Scholar
  14. O’Callaghan J F, Mark DM (1984). The extraction of drainage networks from digital elevation data. Comput Vis Graph Image Process, 28(3): 323344Google Scholar
  15. Ortega L, Rueda A (2010). Parallel drainage network computation on CUDA. Comput Geosci, 36(2): 171178CrossRefGoogle Scholar
  16. Qin C Z, Zhan L (2012). Parallelizing flow-accumulation calculations on graphics processing units—from iterative DEM preprocessing algorithm to recursive multiple-flow-direction algorithm. Comput Geosci, 43(0): 716Google Scholar
  17. Quinn P, Beven K, Chevallier P, Planchon O (1991). The prediction of hillslope flow paths for distributed hydrological modelling using digital terrain models. Hydrol Processes, 5(1): 5979CrossRefGoogle Scholar
  18. Su C, Yu W, Feng C, Yu C, Huang Z, Zhang X (2015). An efficient algorithm for calculating drainage accumulation in digital elevation models based on the basin tree index. IEEE Geoscience and Remote Sensing Letters, 12(2): 424428CrossRefGoogle Scholar
  19. Wang L, Liu H (2006). An efficient method for identifying and filling surface depressions in digital elevation models for hydrologic analysis and modelling. Int J Geogr Inf Sci, 20(2): 193213Google Scholar
  20. Wang Y, Liu Y, Xie H, Xiang Z (2011). A quick algorithm of counting flow accumulation matrix for deriving drainage networks from a DEM. In: Proceedings on the Third International Conference on Digital Image ProcessingGoogle Scholar
  21. Yamazaki D, Baugh C A, Bates P D, Kanae S, Alsdorf D E, Oki T (2012). Adjustment of a spaceborne DEM for use in floodplain hydrodynamic modeling. J Hydrol (Amst), 436–437: 8191Google Scholar
  22. Yao Y, Shi X (2015). Alternating scanning orders and combining algorithms to improve the efficiency of flow accumulation calculation. Int J Geogr Inf Sci, 29(7): 12141239Google Scholar
  23. Zhang H, Yang Q, Li R, Liu Q, Moore D, He P, Ritsema C J, Geissen V (2013). Extension of a GIS procedure for calculating the RUSLE equation LS factor. Comput Geosci, 52: 177188CrossRefGoogle Scholar
  24. Zhou G, Sun Z, Fu S (2016). An efficient variant of the priority-flood algorithm for filling depressions in raster digital elevation models. Comput Geosci, 90: 87–96CrossRefGoogle Scholar

Copyright information

© Higher Education Press and Springer-Verlag GmbH Germany, part of Springer Nature 2018

Authors and Affiliations

  1. 1.Center for Information GeoscienceUniversity of Electronic Science and Technology of ChinaChengduChina
  2. 2.School of Resources and EnvironmentUniversity of Electronic Science and Technology of ChinaChengduChina
  3. 3.State Key Laboratory of Soil Erosion and Dryland Farming on the Loess Plateau, Institute of Soil and Water ConservationChinese Academy of SciencesYanglingChina
  4. 4.Faculty of Geographical ScienceBeijing Normal UniversityBeijingChina

Personalised recommendations