Page 1 of 1

New 3d Terrain

Posted: Sat Jan 01, 2022 12:27 pm
by ACalcutt
I have been testing a still in development feature of maplibre-gl-js that allows me to add 3d terrain to our wifidb map.

In the background I have created my own self-hosted mapbox TerrainRGB file. I generated this using the JAXA ALOS World 3D - 30m (AW3D30) dataset with this script which used gdal and rio rgbify to take the greyscale raster dem from JAXA and make a TerrainRGB mbtiles file compatible with mabox/maplibre

Now that I have created the TerrainRGB file I am able to use it for dynamic hillshade and I am also testing a in development Terrain3d feature for maplibre-gl-js (which I am using to display my maps).

In my own branch of maplibre-gl-js I also added in a button that allows it to be toggled on and off
terrain-toggle.png
terrain-toggle.png (3.92 KiB) Viewed 33556 times
When using the 3d map style and terrain off, you will just see the hillshade layer (shading around hills and mountains, based on the TerrainRGB file)
hillshade.png
hillshade.png (399.8 KiB) Viewed 33556 times

When you click the terrain button you will see a 3d effect showing the elevation is added, based on the TerrainRGB file.
terrain.png
terrain.png (322.12 KiB) Viewed 33556 times

I find this new feature very helpful for mapping since it adds depth to the map and helps you understand the terrain better. However, it should be noted that since this is not a finished maplibre feature...it can be buggy at times...especially on older hardware (in my experience)

Re: New 3d Terrain

Posted: Sun Feb 20, 2022 10:52 pm
by arizonajon
that's pretty cool, Andrew!