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
Other
713 stars 341 forks source link

Not generated layer.json #77

Open hemincan opened 6 years ago

hemincan commented 6 years ago

add -l at the ctb-tile but found 'unrecognized flag -l' can somebody help me?

hemincan commented 6 years ago

see this's docker,Download this image to solve your problem。 https://github.com/tum-gis/cesium-terrain-builder-docker

Hisos commented 4 years ago

Why the parameter -l for ctb-tile is missing?

ahuarte47 commented 4 years ago

Hi @Hisos, you have to use this PR, the master branch does not contain the QuantizedMesh or -l flag support.

Or you can use this Docker image, it already contains all of these capabilities.

Hisos commented 4 years ago

Hi @ahuarte47, thanks for your help. I'm sorry, How can I get your PR codes?

ahuarte47 commented 4 years ago

You can clone or fork my branch: https://github.com/ahuarte47/cesium-terrain-builder/tree/master-quantized-mesh

Hisos commented 4 years ago

@ahuarte47 thank you! I have succeed.

Hisos commented 4 years ago

Hi, @ahuarte47. Do you have a small dem.tif converted successfully by your program? I have tried several dem.tifs, the conversion is ok, but the cesium failed to load the data: "An error occurred in "CesiumTerrainProvider": Failed to obtain terrain tile X: 1 Y: 0 Level: 0.". I tried another software named cesiumLab for the same dem.tif, and the .terrain is ok for cesium. I tried preprocessing the dem.tif by ArcmAap to deal the NoData=0. I tried "-f Mesh" and "-f Mesh -l" or not. All the ways is unamiable for me. What a headache, haha.

ahuarte47 commented 4 years ago

Do you have defined the Content-Encoding: gzip content negotiation header?

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding

This could be useful for you: https://stackoverflow.com/questions/31164976/unable-to-serve-terrain-files-in-cesium-sandcastle https://github.com/geo-data/cesium-terrain-builder/issues/2#issuecomment-57081355

Hisos commented 4 years ago

That's GZip. CTB defaultly gzips the data, Most of the blogs don't mention us of this. So I was confused why the cesium loads terrain failly. That will be ok after the web server defines the Content-Encoding: gzip. Thanks again!