Last summer, I had the idea to build a map of the real world in Minecraft. Now, I did it and here’s how it works.

To build a map based on real geographic data, basically two things are needed:

  • Geographic data of the world, mainly elevation information.
  • The ability to create a map in Minecraft format.

After some googling, I found ASTER which provides an elevation model of the whole earth with a resolution of 1 arc second (30 meters). It’s freely available but quite big (500 GB).

There are a lot of tools around Minecraft, but surprisingly, I found nothing that fitted my needs. Fortunately, the Minecraft wiki provides a detailed description of Minecraft’s file format. It’s a tree of named values, something like a binary json. So I wrote my own file loader / saver.

With these two ingredients, I could create my first maps. Cool.

Mount Fuji

Green Ayers Rock

The tricky thing is to handle the big data. For every point in the map, one (or more if we want to do some interpolation) random access into the 500GB is needed. I ended up with one single big file containing all elevation data and an index file that maps world coordinates to positions in the data file. The index fits into RAM, so one disk access per point is needed. It’s ok, but surely, there are better solutions.

To improve the map, I wanted to include lakes and rivers. I found GSHHG, a data set which contains the shapes of the oceans, lakes and rivers of the world. Additionally, there’s GEBCO which provides a map of sea depths. Together this allows to create pretty nice maps. I spent a lot of time flying through the world…

Hawaii

Grand Canyon

Swiss alps

Norwegian fjords

The difficulty here is to merge the three data sources into one consistent model. I found a solution that is not perfect (due to rounding errors or projection issues?) but works.

That’s the current state of this project. The source code can be found on github but it’s pretty ugly. For the moment, I do not plan to continue, but I have several ideas how it could be improved:

  • Use data from OpenStreetMap to add borders, cities, streets or railroads.
  • Use this vegetation map to determine the type of floor (grass, forest, dirt, sand, ice etc).
  • Correct the inconsistencies between elevation and water models and add different projections.
  • Improve the speed of map generation.
  • Make the map playable, meaning that there should at least be trees and ore/caves in the map.