Cesium Terrain Server

Hello there,

I am trying to set up a Cesium Terrain Server for use on a private network. I am having problems getting the terrain serverd correctly. I have been able to produce .terrain files in the correct format, but I am not sure how to serve them to a client/how to correctly implement a TerrainProvider. I have been using the Cesium Terrain Sandcastle example as a reference. I have also read over many forum posts, and the Cesium Terrain Server data layout documentation.

Is there a way to grab the terrain data from the local machine (for now I am just doing this on my machine). What directory structure must the files be in?

Also, I read on some of the forum posts that AGI is working towards offering Terrain Servers for private networks. Is this something that is offered now? If so, is this a physical device with the terrain data pre-loaded on it? Or is this code that is ready to serve data that we must have on hand?

Any resources/documentation/help would be appreciated.

Thanks for the help,

-Brian

Hi Brian,

Assuming you’re using the format described here for your .terrain files:
https://github.com/AnalyticalGraphicsInc/cesium/wiki/Cesium-Terrain-Server

you don’t need a custom TerrainProvider. Just use CesiumTerrainProvider. That page should also answer your questions about the directory layout (short version: it’s a Tile Map Service). Serving them off your local machine generally won’t work. You need to set up some kind of web server. If the web server is different from the one that is hosting Cesium, you need to make sure that the server includes CORS headers (http://enable-cors.org/). If you’re pre-gzipping your .terrain files (as described in the wiki page), make sure the server also includes the “Content-Encoding: gzip” header. Finally, you should make sure the MIME type returned by the server is “application/octet-stream”.

Yes, AGI is planning to offer a terrain server to simplify this admittedly complicated process. The server is designed to make it easy to incorporate your own terrain data, but will come with a dataset out of the box as well. We’re not sure yet if it will be sold as an appliance or as installable software. Possibly both options will be offered.

Kevin

Kevin,

Thanks a lot for the response. This clears things up for me. I'm also excited to see what options AGI will provide for Terrain Servers in the future.