Website built to test using locally created elevation models for use with procedural-gl.js
This site is not affiliated with any project.
https://xycarto.github.io/3D_Aotearoa/
Sourced from the LINZ Data Service and licensed for reuse under the CC BY 4.0 licence.
-
With the VRT, we can gather all the elevation tiles under one file name.
gdalbuildvrt elevation.vrt *.tif
Using the VRT, we can preform the noData conversion across all the elevation tiles as if it were a mosaic. Better yet, the output from this command, will produce a mosaic out the other side.
-
Remove noData
gdalwarp -t_srs EPSG:3857 -dstnodata None -co TILED=YES -co COMPRESS=DEFLATE -co BIGTIFF=YES elevation.vrt elevation_noData_mosaic.tif
-
RGB-ify the elevation mosaic
rio rgbify -b -10000 -i 0.1 /elevation_noData_mosaic.tif elevation_noData_mosaic_rgb.tif
-
GDAL2Tiles is a quick way to render xyz tile caches if you have single layer and are working in Web Mercator. Be sure to use 3.1 or greater get the functionality of xyz caching and tile size control. You need these both. In the end, I used the GDAL Docker developed by perrygeo and got access to GDAL 3.2. It was a lifesaver, however, I did need to modify the Dockerfile with
—with-python
to add GDALs Python bindings and rebuild the Docker.gdal2tiles.py --s_srs=EPSG:3857 --zoom=0-16 --xyz --tilesize=512 --processes=7 elevation_noData_mosaic_rgb.tif /data/tile-cache