riverdirectionmat function

River Direction Matrix