Calculates the distance of each pixel from the outlet, measured along the drainage directions. By aggregating the matrix so obtained, we get the so called width function. It can evaluate the distance as a projection of the plan or the real distance (3d mode).


The program can work in three different ways:
  1. calculate the distance (projected on the plane) from the outlet in pixel number (pMode = 0)
  2. calculate the distance (projected on the plane) from the outlet in meters on the plane (pMode = 1)
  3. calculate the distance (in 3d) from the outlet in meters in 3d (pMode = 1 and the inPit map not null)


Inputs



Output



References