I have a DEM as shown for which I have determined flow paths using D8 algorithm (My own code) in R. The resulting DEM with the flow paths is also shown. The flow paths are generated in the form of lines with the help of lines function in R, joining the centers of each pixel in the direction of steepest slope. I would like to perform flow routing with flow paths being derived on the DEM. It should be noted that the flow paths are just lines plotted on the DEM using lines function and elevation of the pixels.

Is there any way to perform flow routing for a hypothetical storm event in R?

The DEM The DEM with flow paths developed

  • $\begingroup$ Using R it is probably possible but seems like a bit unintuitive for this work. Did you considered gdal, or GRASS/QGIS or something like this for your task: grass.osgeo.org/grass76/manuals/r.carve.html $\endgroup$
    – marsisalie
    May 30 '19 at 19:20
  • $\begingroup$ We aren't sure if GDAL or other GIS modules will help in routing, however flowpaths are derived from them. We are restricted to R as of now and would like to know coding routines (if any) for flow routing $\endgroup$ May 31 '19 at 3:56

Take a look at the RSAGA package on CRAN, or the rgdal package. Many of the GIS methods can be done in R but basically act as a wrapper for saga or gdal. RSAGA is likely your best bet for processing terrains for flow analysis.

I also know of Dan Moore from UBC who does a lot of work with R and GIS applications, worth taking a look there and certainly those algorithms can be done in R directly.

There is also another post in the GIS forum on using TauDEM in R, worth taking a look as well. TauDEM in R - additional SO post

In general, rseek is an excellent search engine for exactly this type of problem in case you don't find what you are looking for in those links above.

For actual flood routing, you may be interested in the Height Above Nearest Drainage Model (HAND), which uses the same type of D8 flow accumulation algorithm to build a rapid method for floodplain mapping. Good paper on that some other 1D methods.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.