Map terrain use-cases: documentation, examples #5
Replies: 3 comments 3 replies
-
Our initial plan is to re-use https://github.com/tilezen/joerd tiles. You only need to deliver RGB terrain, the hill shading is done in MapLibre GL dynamically. The zoom level is determined by the resolution of the DEM. Beyond 11 or 12 for Terrain RGB it gets very large. It should be easy to use |
Beta Was this translation helpful? Give feedback.
-
Alright that sounds reasonable! For the joerd tiles I found https://registry.opendata.aws/terrain-tiles/ which seems to do the trick already with a style like style: {
version: 8,
sources: {
terrain: {
type: "raster-dem",
tiles: [ "https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png" ],
encoding: "terrarium",
tileSize: 256,
},
},
terrain: {
source: "terrain",
exaggeration: 1.5,
},
}, granted that does not the .pmtiles packaged up raster tiles. Without hillshading Heads-up: quickly running over the joerd terrain tile map I can see some issues, tho. Check this out; seems to mostly happen close to rivers/water/islands |
Beta Was this translation helpful? Give feedback.
-
The JAXA AW3D30 data seems to be a similar resolution to that from Copernicus. Commercial is allowed but requires notification. A script to build mbtiles from them is available at https://github.com/acalcutt/jaxa_AW3D30_to_MBTiles and torrents at https://www.techidiots.net/downloads/open-base-map-torrents/mbtiles/jaxa_terrainrgb0-12-torrent/view and https://www.techidiots.net/downloads/open-base-map-torrents/mbtiles/jaxa_terrarium0-11_mbtiles-torrent/view |
Beta Was this translation helpful? Give feedback.
-
Hey folks I'm playing around with maplibre and protomaps and wanted to look into terrain to see where we're at in terms of visualization but also what open datasets have to offer. In the Protomaps documenation I found a few bits and pieces about raster tiles e.g. here
https://docs.protomaps.com/pmtiles/maplibre#raster-or-terrain-pmtiles
It sounds like
I went ahead and checked out the brand new Copernicus GLO-30
The tifs are freely available (example for a 1° x 1° tile over Switzerland)
For hill-shading this seems to do the trick to get me a hillshaded tif
In addition we want elevation tiles in terrarium encoding; all I found there is
rio rgbify
to turn the Copernicus GLO-30 tifs into terrarium tifs https://github.com/mapbox/rio-rgbifyHere's where I'm a bit lost 🤔
It's not clear to me on which zoom level we should create these terrarium tiles at, though, do we need the full tile hierarchy? Even if I fix the zoom level at z14 the resulting mbtiles file is around 700MB in size, from the original 30MB DEM tif.
From here on I think we can merge the multiple 1° x 1° .mbtiles e.g. with mbutil's patch to end up with a single .mbtiles file. Then we can run
pmtiles convert
to turn that mbtiles file into a single pmtiles file we can serve.That should give us elevation pmtiles; what about the hillshade tif then? Do we need to tile it into mbtiles -> pmtiles the same way, and also the full tile hierarchy? Is there a way to bundle the hillshade and elevation raster data in a single pmtiles file?
Maplibre example how to then use this data https://maplibre.org/maplibre-gl-js/docs/examples/3d-terrain/
If we could create a single pmtiles file for multiple Copernicus GLO-30 tifs, that would be amazing for distributing maplibre terrain data! 🎉
Beta Was this translation helpful? Give feedback.
All reactions