Re-ordering od data matrix and coordinates to match standard grid definition

This is needed for a direct conversion of the coordinates matrix to a SpatialGrid via SpatialPoints (otherwise order is not preserved and maps are misrepresented)