Skip to content

What are the meaning of Grass drainage direction values from r.watershed

An answer to this question on the GIS Stack Exchange.

Question

In Grass r.watershed the D8 drainage directions generated from r.watershed are -8. -6.-4.-2, 2, 4, 6, 8 (-1 No Data)

What actual directions are these?

For example in ArcGIS I know 128 is up and so on from this diagram.

enter image description here

What in Grass r.watershed which is up, right, etc?

When I compare the value to ArcGIS it would be

r,waterhsed (grass).....ArcGIS (flow).....Direction

8 ..........................................1.....................East

6 ..........................................4.....................South

4 .........................................16.....................West

2 .........................................64.....................North

The minus value are very few and likely edge pixel as the grass manual states.

But I would like a source to confirm this (and why only 8 values?)

Answer

GRASS numbers the directions in a drainage (flow direction) raster from 1-8 starting eastward and going counter clock-wise.

What about the negative numbers? GRASS uses negative direction to indicate that the flow from this cell is going off the map. But the absolute value still indicates the direction. So both 4 and -4 mean west. Also, GRASS uses 0 to indicate a sink = no flow at all from this cell.

Copied from here.