# Different output when elevations data hosted on Tomcat and Node server

**URL:** <https://community.cesium.com/t/different-output-when-elevations-data-hosted-on-tomcat-and-node-server/5608>\
**Category:** CesiumJS\
**Created:** [June 7, 2017, 12:58pm UTC](https://community.cesium.com/t/different-output-when-elevations-data-hosted-on-tomcat-and-node-server/5608 "2017-06-07T12:58:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nigamricha17](https://avatars.discourse-cdn.com/v4/letter/n/90ced4/32.png) [@nigamricha17](https://community.cesium.com/u/nigamricha17)\
**Post date:** [June 7, 2017, 12:58pm UTC](https://community.cesium.com/t/different-output-when-elevations-data-hosted-on-tomcat-and-node-server/5608/1 "2017-06-07T12:58:42Z")

</div>

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

```auto
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:

```auto
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](http://localhost:3005/). So, in the Tomcat case, i enable CORS and then it works, whereas in Node server i dont need CORS.

---

<div class="post-metadata">

**Author:** ![Rachel\_Hwang](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@Rachel\_Hwang](https://community.cesium.com/u/Rachel_Hwang)\
**Post date:** [June 9, 2017, 5:58pm UTC](https://community.cesium.com/t/different-output-when-elevations-data-hosted-on-tomcat-and-node-server/5608/2 "2017-06-09T17:58:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nigamricha17](https://avatars.discourse-cdn.com/v4/letter/n/90ced4/32.png) [@nigamricha17](https://community.cesium.com/u/nigamricha17)\
**Post date:** [June 14, 2017, 5:29am UTC](https://community.cesium.com/t/different-output-when-elevations-data-hosted-on-tomcat-and-node-server/5608/3 "2017-06-14T05:29:09Z")

</div>

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’));

---

<div class="post-metadata">

**Author:** ![nigamricha17](https://avatars.discourse-cdn.com/v4/letter/n/90ced4/32.png) [@nigamricha17](https://community.cesium.com/u/nigamricha17)\
**Post date:** [June 14, 2017, 5:36am UTC](https://community.cesium.com/t/different-output-when-elevations-data-hosted-on-tomcat-and-node-server/5608/4 "2017-06-14T05:36:10Z")

</div>

> I am attaching the exact problem as a screenshot.

 ![Extra elevations.png](https://global.discourse-cdn.com/cesium/original/1X/3b541d833eacc604b874367afbabca88081a07df.png)
