allocate a 3d array, not 2d array
longitude is X, latitude is Y.
in-array coordinates need to be calculated relative to the origin

(unless your array is large enough to encompass the earth, in voxels)
start at [0,0,0] instead of lat/lng in voxel coordinates.

This could possibly be changed if OSM is changed to be aware of its
world coordinates, instead of assuming it's at the origin
slightly more reasonable starting position
remove the scaling thing. not sure what that's all about