New 3d Terrain

Talk about random things WiFiDB related, either new things, concepts, or issues to work out in code.
Post Reply
User avatar
ACalcutt
Vistumbler / TechIdiots Admin
Vistumbler / TechIdiots Admin
Posts: 1302
Joined: Sun Oct 21, 2007 6:50 pm
Location: Rutland, MA
Contact:

New 3d Terrain

Post 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 34447 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 34447 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 34447 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)
arizonajon
Contributor
Contributor
Posts: 289
Joined: Wed Feb 04, 2015 11:17 pm
Contact:

Re: New 3d Terrain

Post by arizonajon »

that's pretty cool, Andrew!
Post Reply