mathuin / TopoMC

Building Minecraft worlds from USGS NED and NLCD topographical data
http://www.mathuin.org/TopoMC/
46 stars 11 forks source link

2014 Jul 13 Update

Due to changes in Minecraft and the USGS, this project is on hiatus. It will be revived when the following issues are resolved:

Minecraft changes very quickly, and its changes often break tools like pymclevel. I do not have the time or the interest to roll my own equivalent to pymclevel, so I will wait until someone else does -- hopefully Mojang, but right now anyone who can keep up with the changes will do. On the bright side, I'm really liking Go so either language is good for me.

The USGS web services have become less and less useful over the past few years as they steer customers towards the National Map viewer. I am looking into bulk data transfers (i.e., sending them a hard drive upon which they write terabytes of data before sending it back to me) but then I have to figure out how to store that data in something like PostGIS such that I can retrieve what I need as I have from the USGS in the past. Making this change will also inconvenience anyone else running TopoMC since they too will have to solve the data problem, but if I do it right they can use the National Map viewer to download the portion of the United States that fits their requirements instead of the whole thing like me.

I welcome any assistance with these issues.

Welcome to TopoMC!

The TopoMC project facilitates the construction of superficially realistic Minecraft worlds leveraging USGS, specifically the NED and NLCD datasets.

Major changes:

Before running TopoMC

You will need some additional software installed on your system before TopoMC can run. On Ubuntu (precise pangolin), the following packages need to be installed:

git gdal-bin python-scipy python-gdal python-suds python-yaml python-progressbar

Other operating systems use other packaging systems so you're on your own -- the error messages will tell you what's missing, but it's up to you to find it and install it!

How to use TopoMC

The best way to get latitude and longitude is through Google Maps. Choose your chunk of the planet (still limited to the United States and its possessions, alas) and right-click the upper left corner of the region you wish to model. Select 'What's here', and the tooltip should provide the latitude and longitude in decimal degrees. Do the same for the lower right corner of the region.

Next, here's what to do!

  1. Import the pymclevel submodule. Must be done once before anything else! There are two commands here, init and update:

    jmt@belle:~/git/TopoMC$ git submodule init
    jmt@belle:~/git/TopoMC$ git submodule update
  2. (Optional) Compile the accelerated NBT module in pymclevel.

    jmt@belle:~/git/TopoMC$ (cd pymclevel && python setup_nbt.py build)
  3. Retrieve the region from the USGS. The upper left latitude is the "ymax" value as seen below, and the lower right latitude is the "ymin". For longitude, the upper left is the "xmin" while the lower right is the "xmax".

    jmt@belle:~/git/TopoMC$ ./getregion.py --name Provincetown --ymax 42.0901 --xmin -70.2611 --ymin 42.0091 --xmax -70.1100
  4. Prepare the region for processing.

    jmt@belle:~/git/TopoMC$ ./prepregion.py --name Provincetown
  5. Construct the Minecraft world based on the region.

    jmt@belle:~/git/TopoMC$ ./buildregion.py --name Provincetown

Geek knobs for GetRegion.py

GetRegion.py has a number of optional arguments not shown above.