Isocontours of depth and magnitude of gradient We are interested in characterizing a 2D surface $z(x,y)$, where $(x,y)$ is the regular 2D Cartesian grid. Let $\nabla z = (z_x, z_y)$ denote the gradient. The surface is a "general" one, that is, devoid of any special symmetries.
We know the isocontours of constant $z$ and the isocontours of constant $|| \nabla z ||$ at every point. To what extent does this information characterize the surface? (For example, we can the call the surface completely characterized if we know the values of $z$ at every point $(x,y)$ up to a global multiplicative scale and additive offset, or the exact values of the gradient $(z_x, z_y)$ at every point.)
Note that the surface is "general", so at least some isocontours of constant $z$ and constant $|| \nabla z ||$ can be assumed to intersect.
To look at the problem in another way, knowing the isocontours of constant $z$ is the same as knowing the direction of the gradient, that is the ratio $\displaystyle\frac{z_y}{z_x}$, at every point. The surface will be completely specified if, in addition, we also know the magnitude of the gradient, $|| \nabla z ||$, at every point. Instead, all we know are the isocontours of constant $|| \nabla z ||$. Is there an elegant characterization of the ambiguity to which we can infer the values of $z$?
 A: Let $p$ be a generic point in the sense that there exists an open set $V\ni p$ such that the isocontours are nondegenerate (in that they are 1-dimensional curves, not 0-d points or 2-d regions) and intersect transversally. Then in a possibly smaller neighborhood $U\subset V$, the values of $z$ is uniquely determined by $(z, |\nabla z|)(p)$. These two degrees of freedom corresponds precisely to the trivial scaling and vertical translation freedoms. So in other words, in generic regions there are no more ambiguity. 
The proof is simple: just observe that your conditions gives a hyperbolic PDE in 2 dimensions with initial data prescribed on characteristic curves. 
Since in $V$ the isocontours are nondegenerate and intersects transversally, we can pick two unit vector fields $v,w$ tangent to the isocontours, and so they are transversal. Now, that $v$ is orthogonal to $\nabla z$ implies that 
$$ w \cdot \nabla z = \pm |\nabla z| \sqrt{1 - (v\cdot w)^2} $$
The sign ambiguity is due to, again, the scaling ambiguity of the original setup. Now, we know that $|\nabla z|$ is constant along integral curves of $w$. So along the integral curve of $w$ that passes through $p$, the above equation uniquely determines $w\cdot\nabla z$. This means that we can integrate this first order ODE and solve for $z$ along the integral curve of $w$ through $p$.
Now, using that $z$ is constant along the integral curves of $v$, we can extend this solution off $p$ as long as $v$ is transversal to $w$. q.e.d.
This also illustrates why when the isocontours are parallel, you get a larger ambiguity: this corresponds to the two characteristics of the second order hyperbolic PDE coinciding. And therefore the data $(z,|\nabla z|)(p)$ at one point, when propagated, either gives you too little information (only the solution along one isocontour, and the solution remains free elsewhere), or too much (that the propagation equations rel. to $v$ and $w$ are not compatible.)
