Different output when elevations data hosted on Tomcat and Node server

69 views
Skip to first unread message

nigamr...@gmail.com

unread,
Jun 7, 2017, 8:58:42 AM6/7/17
to cesium-dev

When i write below code and host .terrain files on Tomcat, i can correctly see elevations of an area:

var terrainProvider = new Cesium.CesiumTerrainProvider({      
  url: 'http://localhost:8080/terrain/terrain_52_06'
});
this.scene.terrainProvider = terrainProvider;

But, when i write below code and host .terrain files on nodejs server, i can see elevations of the area, but in addition to that i can see elevated spikes all over map on the globe also:

var terrainProvider = new Cesium.CesiumTerrainProvider({      
  url: 'http://localhost:3005/terrain/terrain_52_06'
});
this.scene.terrainProvider = terrainProvider;

Basically, my app runs on node server at: http://localhost:3005. So, in the Tomcat case, i enable CORS and then it works, whereas in Node server i dont need CORS.

Rachel Hwang

unread,
Jun 9, 2017, 1:58:57 PM6/9/17
to cesium-dev

Hi there,


If you navigate to the tile directly in the browser, do you get the exact same file back in both cases? Also, is the terrain pre-gzipped? If so, are you setting the content-encoding to indicate that it is in both cases? Apart from that, it sounds like this is a server configuration issue which will be tricky to help with without knowing the exact details for both servers.


Hope that helps,

- Rachel

nigamr...@gmail.com

unread,
Jun 14, 2017, 1:29:09 AM6/14/17
to cesium-dev
When i navigate to the .terrain file directly from the browser i get exact same file on both cases! 
Terrain is not zipped. I am using .terrain files generated from a .tif file using gdal2srtmtiles.py script.

This is such a strange issue i am facing! :(

In case of tomcat, i am placing the terrain folder inside webapps folder.
In case of node, i am placing the terrain folder inside public folder and accessing using:
              app.use('/terrain', express.static(__dirname + '/public/terrain/terrain_52_06'));

nigamr...@gmail.com

unread,
Jun 14, 2017, 1:36:10 AM6/14/17
to cesium-dev
I am attaching the exact problem as a screenshot.
Extra elevations.png
Reply all
Reply to author
Forward
0 new messages