Compute flow accumulation only from flow direction?

The following is a step-by-step process for how to take an ArcGIS D8 flow direction raster and use it to perform a D8 flow accumulation operation in Whitebox Geospatial Analysis Tools. I will preface this by saying that it would obviously be much easier if you had the original DEM from which the flow direction raster was derived. Also, I'm making the assumption that your flow direction raster was derived using the D8 flow algorithm and that it was derived using the ArcGIS flow pointer scheme.

  1. The first step is getting your flow direction raster from ArcGIS into Whitebox GAT. There are several ways to do this, but I recommend using the Raster to Float tool in ArcGIS to convert your raster into a .flt file. This is one of the most efficient formats for getting data into Whitebox GAT. Next, open Whitebox GAT and add the layer to the map. A pop-up window will appear asking if you'd like to convert the raster to Whitebox format, and you simply need to click 'yes'.

  2. The ArcGIS D8 flow direction raster uses the following scheme:

enter image description here

Which is different than Whitebox GAT's:

enter image description here

So you need to use the Reclass tool to convert the pointer values:

enter image description here

  1. Now all you need to do is enter your new flow direction raster as the input D8 flow pointer raster file in the D8 and Rho8 Flow Accumulation tool.

enter image description here

As for your question about the weight raster, you might want to take a look at the D8 Mass Flux tool, which allows for a weight (loading) file and two types of losses (efficiency, which is a proportional loss, and absorption, which is a loss amount).

enter image description here


A new GRASS addon r.accumulate is available. This module only requires a flow direction map to calculate weighted flow accumulation.

If you have a drainage map from r.watershed,

r.accumulate direction=drain_directions accumulation=flow_accum

or using its GUI,

r.accumulate GUI

In this example, the yellow arrows and color-coded numbers show flow directions and accumulation, respectively.

r.accumulate NC example

Optionally, you can perform weighted flow accumulation using the weight option.

r.accumulate direction=drain_directions accumulation=flow_accum weight=flow_weight

If you have a FDR map (FDR.TIF for example) from ArcHydro or ArcGIS,

# import ArcHydro FDR
r.in.gdal input=FDR.TIF output=fdr

# convert FDR to drainage
r.mapcalc expression="drain_directions=int(8-log(fdr,2))"

# calculate accumulation
r.accumulate direction=drain_directions accumulation=flow_accum