Tomographic determination of velocity and depth in laterally varying media