5

Legend

I am interested to know why ‘Flow Direction Raster’, derived from ‘Filled DEM’, generates values ranges from 1-128, with pixel depth of 8 bit unsigned integer which is readily capable to store values 0-255, As such, in the Tool’s Help, it is clearly stated that “the output of the Flow Direction tool is an integer raster whose values range from 1 to 255”. My ‘filled DEM’ carries 16bit signed integer pixel depth already, which has capacity to store values range from -32768 to 32767!

7
  • Could you clarify a bit. Are you wondering why the values are 1-128 or about the data type/storage?
    – Martin
    Mar 10, 2016 at 12:52
  • Yes I am wondering to get 1-128 value range, On the contrary, the tool's help intimates the value range from 0-255 of the derived 'Flow Direction Raster'.
    – Rex
    Mar 10, 2016 at 12:56
  • The explanation of the 1-128 values is found in the help right next to the information about value range from 1-255. It's a way to represent the flow direction using a method called D8. I'll happily explain it further, but if you can be a little bit more specific about what you don't understand it'll be helpful.
    – Martin
    Mar 10, 2016 at 13:01
  • On a side note, I'd recommend using ArcHydro tools for this kind of calculations instead of the Spatial analyst tools. Gives you more control.
    – Martin
    Mar 10, 2016 at 13:03
  • Thanks for anticipation, as suggested, I will go through 'tools help' again to get understanding of D8, otherwise I will seek help.
    – Rex
    Mar 10, 2016 at 13:05

2 Answers 2

6

There are eight valid output directions relating to the eight adjacent cells into which flow could travel. This approach is commonly referred to as an eight-direction (D8) flow model, the direction coding is shown:

enter image description here

If the water will flow to the cell immediately to the right, it will be assigned a code of 1, if it flows to the top right cell then the code assigned is 128 as so on.

1
  • 1
    Actually, the reason why the values are ranged from 1 to 128 is to be able to add any two of them together an always know which two was used. It's not relevant in D8, but other methods that take multiple flow directions from each cell into account make use of this.
    – Martin
    Mar 10, 2016 at 13:18
0

I believe there is one paragraph in the Tool Help stating that when there are many flow directions for a single cell, it would calculate its flow direction as the sum of all the codes for the direction (i.e, 1,2,4,8,16,32,64,128). Hence, the actual output range of 1 to 255.

Note that 255 is the sum of all the direction codes. You can also get the other possible output values by summing different combinations (combinations composed of 1,2,3,4,5,6,7 values) of the direction codes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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