alb0 / 3d-greenland

data and code for 3d models
Apache License 2.0
3 stars 6 forks source link

3d-greenland

Data and code for producing 3D models.

Data Preperation

Some notes on a process for creating the .STL files from polar datasets. Generated during the dataviz hackathon 11/3-4/2014.

A process that can be followed uses what are called "height-maps". The idea is to obtain grey scale images (.png) of the bed and surface of the region of interest. Having these images, a short C program can be run to produce the corresponding STL file.

Getting the data

Begin by downloading and appropriate data set providing bed and surface elevation. A quick option is to take these from the SeaRISE data sets, located here:

http://websrv.cs.umt.edu/isis/images/a/a5/Greenland_5km_v1.1.nc

Saving a grayscale .png

These netcdf files can be challenging for a new comer to work with. One way of doing it is to load the data into a program like Q-GIS in order to view it. ncview is also popular. Here, I explain the steps for saving the .png from QGIS.

Converting the .png to an .stl

Download, and install libtrix:

https://github.com/anoved/libtrix

with

make sudo make install

Then build hmstl:

https://github.com/anoved/hmstl

with:

make

Use hmstl to create the .stl file from the .png. The README file has many examples, but it is mostly just a matter of:

./hmstl -z -i .png -o .stl

It is also possible to include a mask, see the REAME.