Render Layer Z in orthogonal and perspective projection
Quote from blenderguru


  View Z Depth and View Distance are very similar and most of the time it doesn’t really matter which you use. But to be thorough: the Z Depth is essentially a plane in line with the camera, and the Distance is literally the distance from the center of the camera emanating radially outwards.




This is for input, not for output but I assume that since the terminology is the same it should do the same calculation.

This brings me to the second question. You could use the above mentioned input on a separate render layer with a material override,