Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in loading terrain files (.terrain) #59

Open
YingcaiDong opened this issue Mar 31, 2018 · 5 comments
Open

Error in loading terrain files (.terrain) #59

YingcaiDong opened this issue Mar 31, 2018 · 5 comments

Comments

@YingcaiDong
Copy link

I can't load the terrain file to the cesium. Now I will describe how I did it step by step. Hope this will help you find out where I went wrong.

STEPS:

  1. Basically, I am following the tutorial in this post. The terrain.tif can be downloaded in the post link.

  2. Built the Cesium-Terrain-Builder into several executable files.

enter image description here

  1. Using command line described on the GitHub page to generate the terrain tiles.
    ctb-tile -o ./data/tilesets/terrain/texel dem.tif

The directory of the terrain files

  1. Follow the steps of how to install Cesium-terrain-server. Using go, and generate a cesium-terrain-server.exe in my GOPATH.

  2. Using cmd to setup the terrain tiles service
    cesium-terrain-server -web-dir ../data/tilesets/terrain/texel -port 8000

  3. In my visual studio code, I write the code shown below

App.js code

  1. And I get the error message in the console, and on the web page an empty canvas with stars in the background.

Error Message

@bertt
Copy link

bertt commented Dec 6, 2018

That post is 2 years old, I think something in Cesium is changed. Try again with updated blog https://bertt.wordpress.com/2018/11/26/visualizing-terrains-with-cesium-ii/

@BWibo
Copy link

BWibo commented Dec 7, 2018

I believe the URL to your terrain data is wrong.
According to cesium-terrain-server docs the default base URL for terrain tiles is /tilesets.
Try opening http://localhost:8000/tilesets in a browser. If you see your layer.json file, the URL should work.

@ananaijianji
Copy link

I have the same problem.Have you solved it?
"An error occurred in "x": Failed to obtain terrain tile X: 1 Y: 0 Level: 0."

@Gwing97
Copy link

Gwing97 commented Jan 20, 2021

Seems like a common problem.
I have the same problem too. Have anyone solved it ?
image

@jpespartero
Copy link

jpespartero commented Apr 15, 2021

I think that the ctb-tile tool do not generate the two first level of terrain. You have to include manually the two top level tiles in the folders 0/0/0.terrain and 0/0/1.terrain

See the following link (#1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants