geo-data / cesium-terrain-server

A basic server for serving up filesystem based tilesets representing Cesium.js terrain models
271 stars 111 forks source link

Terrain data is not visible, it's only flat surface #18

Closed SurajitChowbey closed 5 years ago

SurajitChowbey commented 5 years ago

The problem is after adding the terrain provider also I'm getting a flat surface.

new Cesium.CesiumTerrainProvider({           
            url : "http://localhost:8080/tilesets/tiles",
            requestVertexNormals : true
 })

I'm using the docker image in windows 10.

The size of the tiff image was 2.72 gb and the size of build terrain data is around 150 mb.

I have used the following process:

  1. docker run -p 8080:8000 -v "${pwd}/tilesets/terrain:/data/tilesets/terrain" geodata/cesium-terrain-server
  2. it's available in http://localhost:8080/tilesets/tiles this path.

Here the screenshot:

Screenshot (50)

Screenshot (49)

Can anyone suggest me what I'm missing here.

Klingseis commented 5 years ago

How did you create your build terrain?

SurajitChowbey commented 5 years ago

Using this: https://github.com/tum-gis/cesium-terrain-builder-docker

Used the following commands:

docker run -v "${PWD}:/data" -it --name ctb tumgis/ctb-quantized-mesh

ctb-tile -f Mesh -C -N -o ./tilesets/terrain/test a.tif
Klingseis commented 5 years ago

Okay, is it possible to provide the tiff image, which you use? Then I could check it on my machine, if it works. Docker didn't work for me with Windows 10.

SurajitChowbey commented 5 years ago

Here the link:

https://drive.google.com/file/d/1y-vmq1c-9qJQdweWnXUHfrF_X-XKZtRc/view?usp=sharing

Klingseis commented 5 years ago

Okay, I created the terrain files and also the layer.json. But trying to use these files in Cesium, I just get the following error: "An error occurred in "CesiumTerrainProvider": Failed to obtain terrain tile X: 1 Y: 0 Level: 0."

So right now, I'm not able to see anything.

SurajitChowbey commented 5 years ago

You have to change the path of terrain server.

let assume /home/ispluser/data/tiles is the folder where you have saved your terrain data

Then, after running

docker run -p 8080:8000 -v /home/ispluser/data:/data/tilesets/terrain geodata/cesium-terrain-server

in the index.html file under /var/www/cesium/

you have to change the following terrain URL

"/tilesets/terrain/tiles" to "/tilesets/tiles"

I think it will resolve the error.

SurajitChowbey commented 5 years ago

I think the input data I am using is not correct.

So for now I am closing the issue for now.

Thank you for your help.