A 3D terrain map of Iceland using Three.js and GDAL
Playing with open data and open-source libraries to make a three-dimensional terrain map of Iceland
Over the last two months I managed two things: to keep my newest child alive during paternity leave, and to make a 3D model of Iceland using open source and open data. The second is probably of most interest to everyone reading this.
I wanted to try and make a digital version of the physical model of Iceland that’s usually on display inside Reykjavík City Hall. The National Land Survey of Iceland provides the data: land cover data (glaciers, pastures, sand, etc) at 1:100,000 from the EU’s CORINE project, elevation and hillshade (accurate to 10m) from a 2016 digital elevation model. The colour schema is my own, which is probably the bit that most needs work.
GDAL and Three.js was all the software I needed. If you want to try something similar, several tutorials by Bjørn Sandvik are required reading:
- Converting GeoTIFF terrain data to a WebGL-friendly format
- Building a terrain mesh for Three.js
- Creating a terrain texture for Three.js
Fun fact: across Europe, to be classified as forest, trees need to be at least five metres tall. But a special exemption is made for Iceland, where they only need to be two metres tall. The old joke ‘If you get lost in an Icelandic forest, stand up’ now has a statistical grounding.