I tried to create a cesium terrain file by referring to the blog.
blog url : VISUALIZING TERRAINS WITH CESIUM II | bert
The problem here is that
- The .terrain data was successfully converted to 130MB, but it is not visible in Cesium.
- I checked the code source provided in the blog (GitHub - bertt/cesium_terrain) and found that the .terrain data size is 309MB, which is normally displayed in cesium.
What I want is to create a .tif file as .terrain, and I tried the following methods, but all of them failed.
1.docker Package ctb-quantized-mesh · GitHub
gdalwarp -t_srs EPSG:3857 M_09BZ1.tif M_09BZ1_3857.tif
docker run -it --rm -v C:/docker/terrain:/tileset Package ctb-quantized-mesh · GitHub ctb-tile -f Mesh -C -o /tileset/tiles /tileset/M_09BZ1_3857.tif
docker run -it --rm -v C:/docker/terrain:/tileset Package ctb-quantized-mesh · GitHub ctb-tile -f Mesh -C -l -o /tileset/tiles /tileset/M_09BZ1_3857.tif
2.docker tumgis/ctb-quantized-mesh
docker run -it --rm -v C:/docker/terrain:/tileset tumgis/ctb-quantized-mesh ctb-tile -f Mesh -C -o /tileset/tiles /tileset/M_09BZ1_3857.tif
docker run -it --rm -v C:/docker/terrain:/tileset tumgis/ctb-quantized-mesh ctb-tile -f Mesh -C -l -o /tileset/tiles /tileset/M_09BZ1_3857.tif
- GitHub - geo-data/cesium-terrain-builder: A C++ library and associated command line tools designed to create terrain tiles for use in the Cesium JavaScript library download
docker build --no-cache -t ctb-builder-windows .
docker run --rm ctb-builder-windows /bin/bash -c “ls /usr/local/src/cesium-terrain-builder/”
docker run --rm ctb-builder-windows /bin/bash -c “cat /usr/local/src/cesium-terrain-builder/build/make.log”
docker run --rm ctb-builder-windows /bin/bash -c “find /usr/local/src/cesium-terrain-builder/build -type f -executable”
docker run --rm -it ctb-builder-windows /bin/bash -c “ldd /usr/local/src/cesium-terrain-builder/build/tools/ctb-tile”
docker run --rm -it ctb-builder-windows /bin/bash -c “ls /usr/lib/gdalplugins”
docker run --rm -it ctb-builder-windows /bin/bash -c ‘echo $LD_LIBRARY_PATH’
→ The dockerfile and cmake files were outdated and did not match the versions, so execution was not possible.
I know that I can convert .terrain data through cesium ion, but I cannot use cesium ion because I need to create a separate function to convert it.