On the 19th of March 2021 Iceland got a welcome distraction from the tedium of the Covid pandemic in the form of a volcanic eruption. It was virtually the perfect tourist volcano: it was easy to get to from the capital city of Reykjavík — but not close enough to any urban area to be a danger to life — there was no ash cloud clogging the sky, and, according to Einat Lev, professor of volcanology at Columbia University, the volcano itself was ‘very well behaved’. It was an easy hike you could do in an afternoon. People flocked there in their thousands.
This wasn’t just good for tourists. Landmælingar Íslands (LMÍ), the national land survey of Iceland, regularly surveyed the eruption from an aeroplane, flying overhead and taking high-resolution photos of the ground. This allowed them to map the area, measure the spread and thickness of the new lava, and track the speed it was flowing from the crater. LMÍ also used stereophotogrammetry to create a digital elevation model of the area. A pair of images, taken at different positions, can be used to estimate the three-dimensional shape of a an object — like a volcano, for example. To my great delight, LMÍ have made the results available in a scientific paper1, published their many elevation models, and created a WMS web service for the aerial imagery.
I discovered all this at about the same time as MapLibre GL JS, the open-source web mapping library, announced its support for 3D terrain. That made me think: I wonder if I could make something from all of this? And so, after a few evenings of data wrangling, I made a 3D map of the Fagradalsfjall volcanic eruption as it was on the 26th of June 2021. Exactly one year ago today. You can see it above or you can play around with the full-screen map.
It’s come out quite nicely, I think, but it wasn’t quite as easy as I’d hoped. (It never is.) There was a fair bit of trial and error involved in stitching the digital elevation model (DEM) TIFFs together and I helped get a patch into MapLibre that was needed for the 3D terrain to work correctly. A large part of the work was converting the stitched DEM into TerrainRGB tiles — Syncpoint have an excellent how-to guide if you ever need to do the same. Using GDAL, Rasterio, and rio-rgbify it went roughly like this:
# Combine all the DEMs from the time of the eruption (https://zenodo.org/record/6598466) # Transform from EPSG:3057 to EPSG:3857 (cropping to bbox.geojson while we're at it) # Convert the combined DEM to TerrainRGB # Create TerrainRGB tiles for MapLibre
Then I used MBUtil to store all the TerrainRGB tiles as a single MBTiles archive, and then I converted that to a PMTiles archive to make it easier to serve from Amazon S3. This was all just for the 3D terrain tiles; I had plans to host a copy of the aerial imagery myself, but I haven’t yet managed to make a high-res tileset. Instead, I’ve used Landmælingar Íslands’s WMS API directly.
Volume, effusion rate, and lava transport during the 2021 Fagradalsfjall eruption: results from near real-time photogrammetric monitoring by Pedersen et al, still to be peer-reviewed.