It calculates the drainage directions with the method of the maximal steepest descent slope, choosing it among 8 possible directions around the selected pixel.

Inputs



Output



Notes

The maximal slope direction is chosen among the 8 possible directions and codified with numbers ranging from 0 to 8. Such method derives from the one originarily used by D. Tarboton in his Phd thesis. Note that the outlets are NOT marked with value 10 (beware: many other programs assume it so consider running OmsMarkoutlets model on the flow map out of this tool).