3DTiles Terrian Builder
使用 cesium terrain builder
工具制作3DTiles地形。
数据
准备某地区DEM影像,投影为EPSG:4326。
Cesium Terrain Builder Docker
拉取 docker image
docker pull tumgis/ctb-quantized-mesh
run
docker run -it --name ctb -v "d:/docker/terrain":"/data" tumgis/ctb-quantized-mesh
CTB
gdalbuildvrt tiles.vrt bj_dem.tif
生成切片
ctb-tile -f Mesh -C -N -o terrain tiles.vrt
生成layer.json
ctb-tile -f Mesh -C -N -l -o terrain tiles.vrt
{
"tilejson": "2.1.0",
"name": "tiles",
"description": "",
"version": "1.1.0",
"format": "quantized-mesh-1.0",
"attribution": "",
"schema": "tms",
"extensions": [ "octvertexnormals" ],
"tiles": [ "{z}/{x}/{y}.terrain?v={version}" ],
"projection": "EPSG:4326",
"bounds": [ 0.00, -90.00, 180.00, 90.00 ],
"available": [
[ { "startX": 0, "startY": 0, "endX": 1, "endY": 0 } ]
,[ { "startX": 3, "startY": 1, "endX": 3, "endY": 1 } ]
,[ { "startX": 6, "startY": 2, "endX": 6, "endY": 3 } ]
,[ { "startX": 12, "startY": 5, "endX": 13, "endY": 6 } ]
,[ { "startX": 25, "startY": 11, "endX": 26, "endY": 12 } ]
,[ { "startX": 51, "startY": 22, "endX": 53, "endY": 24 } ]
,[ { "startX": 103, "startY": 44, "endX": 106, "endY": 48 } ]
,[ { "startX": 206, "startY": 88, "endX": 213, "endY": 96 } ]
,[ { "startX": 412, "startY": 177, "endX": 426, "endY": 192 } ]
,[ { "startX": 824, "startY": 355, "endX": 853, "endY": 384 } ]
,[ { "startX": 1649, "startY": 711, "endX": 1706, "endY": 768 } ]
,[ { "startX": 3299, "startY": 1422, "endX": 3413, "endY": 1536 } ]
,[ { "startX": 6599, "startY": 2844, "endX": 6826, "endY": 3072 } ]
]
}
Code
CTB生成的瓦片是经过GZIP压缩的。
文章来源:https://www.toymoban.com/news/detail-400994.html
验证
python terrain2stl.py 0_0_0.terrain 0_0_0.stl -t
文章来源地址https://www.toymoban.com/news/detail-400994.html
参考
- https://github.com/tum-gis/cesium-terrain-builder-docker
- https://github.com/ahuarte47/cesium-terrain-builder/blob/master/src/TerrainTile.cpp
- QuantizedMesh2STL Demo
到了这里,关于3DTiles Terrian Builder的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!