The coordinates are based on the 3D cartesian coordinate system where the origin is at some arbitrary location in the map, it really depends on where the original map developer started creating the map elements. And, yes, the third coordinate is the Z axis which is the vertical position (relative to the origin).