Failed to obtain terrain tile

Hello,

Despite researching all the previous posts on properly configuring CesiumTerrainProvider I have still not been able to visualize my .terrain tiles constructed by cesium terrain builder.

I’m trying to host both Cesium and terrain on a local server using “python -m SimpleHTTPServer 8000”

I am receiving the errors “Failed to obtain terrain tile X: 1 Y: 0 Level: 0” and “Failed to obtain terrain tile X: 0 Y: 0 Level: 0”. I made sure to include the empty .terrain tiles 0/0/0.terrain, 0/1/0.terrain, and the layer.json properly.

The server feed acknowledges that the get request to the layer.json and .terrain files were successful:

127.0.0.1 - - [28/Aug/2015 14:53:01] “GET /Apps/rapid/data/tilesets/terrain/sample/0/1/0.terrain?v=(version) HTTP/1.1” 200 -

I’m assuming this is an issue with CORS. I’ve attempted the suggestion of using a proxy ie. DefaultProxy(’/proxy/’) within the CesiumTerrainProvider and was receiving “message File not found” (404). Maybe I was mistaken in using ‘/proxy/’ verbatim and it really is pseudocode for an appropriate proxy url? Either way, I lack knowledge on how servers work and need help with these last few steps.

I’d really appreciate any suggestions to make the terrain visible,
Thanks!

Corbin

If you are using two separate instances of “python -m SimpleHTTPServer 8000”, there are several problems.

  1. Are you using the same port for both? Because that won’t work.

  2. If you are using different ports, then both will work but CORS is definitely an issue.

  3. The sample proxy code is meant to work with the development Node.js server that ships with Cesium, so if you are using a different server (which you are) you need to supply your own proxy.

An easy way to get things working is to temporarily move all of your terrain into a sub-directory of your client code and serve them both out of 1 server. This will eliminate the CORS issue and make sure everything works before tackling the CORS issue.

Hi,

We have aerial imagery for land surface and Digital Elevation Model from LiDAR data. We use ArcGIS Server to serve this data as web services.

I’ve tried to use our web service to create our own earth surface but I got the this error when I’ve tried to create my own terrain.

I’ve tried to use “Hello World SandCastle Example” and ESRI free elevation web service for testing but I got the same error again.

And I tried this example but the result is the same.;

http://cesiumjs.org/Cesium/Build/Documentation/ArcGisImageServerTerrainProvider.html

Example:
**var terrainProvider = new Cesium.ArcGisImageServerTerrainProvider({
  url : 'https://elevation.arcgisonline.com/ArcGIS/rest/services/WorldElevation/DTMEllipsoidal/ImageServer',
  token : 'KED1aF_I4UzXOHy3BnhwyBHU4l5oY6rO6walkmHoYqGp4XyIWUd5YZUC1ZrLAzvV40pR6gBXQayh0eFA8m6vPg..',
  proxy : new Cesium.DefaultProxy('/terrain/')
});
viewer.terrainProvider = terrainProvider;**
**Result:**
An error occurred in "ArcGisImageServerTerrainProvider": Failed to obtain terrain tile X: 1 Y: 0 Level: 0.
An error occurred in "ArcGisImageServerTerrainProvider": Failed to obtain terrain tile X: 0 Y: 0 Level: 0.
Where have I gone wrong?

29 Ağustos 2015 Cumartesi 01:41:39 UTC+3 tarihinde corbi...@gmail.com yazdı:

Hello,

It looks like the application isn’t able to access the server. The first thing I would try is to remove the proxy. Other than that, I’m not really sure how to troubleshoot other than to double check that your URI to the server and your token are correct.

If that doesn’t work, are there any other error messages that appear in the console?

Sorry I can’t be more helpful.

-Hannah

Thanks Hannah,

But I searched this topic in cesium-dev group detaily, I found and read some other messages about this topic;

https://groups.google.com/forum/#!topic/cesium-dev/IyzpVzFC5z4

https://groups.google.com/forum/#!topic/cesium-dev/5R54zPBP6PQ

https://groups.google.com/forum/#!msg/cesium-dev/zhJgvO4U3Vk/A3yvKnQRMA8J

I couldn’t understand clearly. I want to use ArcGIS ImageServer services firstly, because I know much more things about that technology.

But I guess Cesium doesn’t work ArcGIS ImageServer services. Am I right?

For Example; I found these free image services on the net;

http://kyraster.ky.gov/arcgis/services/ElevationServices/Ky_DEM_USGS_10M/ImageServer

http://services.nconemap.gov/arcgis/rest/services/Elevation/DEM20ft_DEM/ImageServer

http://services.nationalmap.gov/arcgis/rest/services/USGSNAIPImagery/ImageServer

https://raster.nationalmap.gov/arcgis/rest/services/Orthoimagery/USGS_EROS_Ortho_1Foot/ImageServer

They are all open and free to use. I’ve wanted to understand how “Cesium.ArcGisImageServerTerrainProvider” works. After that, I want to serve my own image services.

But I got the same error every time. (I’ve tried every version of this code, this time “token” is passive, I know that)

var viewer = new Cesium.Viewer(‘cesiumContainer’);

var terrainProvider = new Cesium.ArcGisImageServerTerrainProvider({

});

viewer.terrainProvider = terrainProvider;

Console;

*An error occurred in “ArcGisImageServerTerrainProvider”: Failed to obtain terrain tile X: 0 Y: 0 Level: 0. *

An error occurred in “ArcGisImageServerTerrainProvider”: Failed to obtain terrain tile X: 1 Y: 0 Level: 0.

If it is possible to use, I want to use “ArcGisImageServerTerrainProvider” but I’m really confused about that.

What shall I do?

7 Eylül 2016 Çarşamba 16:21:37 UTC+3 tarihinde Hannah Pinkos yazdı:

Ah, thanks for pointing me to those forum posts.
Sorry, I’m not very familiar with using this type of terrain provider, but Kevin’s answer to this thread is a good one: https://groups.google.com/d/msg/cesium-dev/zhJgvO4U3Vk/A3yvKnQRMA8J

Using this terrain provider apparently takes a little more work to decode the types of data coming from the ArcGIS image server.

Sorry I can’t be more helpful. Maybe someone else using this type of terrain provider will have some suggestions?

Best,

Hannah

Thanks,

I’ll try to generate my own terrain using GDAL and Cesium Terrain Builder. After that, I’ll try to use CesiumTerrainProvider.

Cheers,

8 Eylül 2016 Perşembe 18:13:46 UTC+3 tarihinde Hannah Pinkos yazdı: