I need to know if there are simple commands for this 2 points:
the distance from the nearest stream, D [m], defined as the length of the path that hydrologically connects the location under exam to the nearest element of the reference drainage network;
the elevation to the nearest stream, H [m], computed as the difference between the elevation of the cell under exam and the elevation of the final point of the aboveidentified path.
For the number 1, i tried "cost distance" but i'm not sure.