Cesium- Offline terrain elevation data

2,005 views
Skip to first unread message

nigamr...@gmail.com

unread,
May 18, 2017, 1:18:47 AM5/18/17
to cesium-dev
Can you please provide me .terrain files? I need offline terrain elevations data.
But now it seems the hostname does not exist.

Rachel Hwang

unread,
May 20, 2017, 2:00:48 PM5/20/17
to cesium-dev
Hi there,


Hope that helps,
- Rachel

nigamr...@gmail.com

unread,
May 22, 2017, 4:19:01 AM5/22/17
to cesium-dev
Hi,

Actually, for the below code:

    var terrainProvider = new Cesium.GeoserverTerrainProvider({ 
        url : "http://localhost:8080/geoserver/wcs/wms", 
        layerName: "wcs:clip11(reproject)", 
        waterMask:true 
    }); 
    globe.terrainProvider = terrainProvider; 

Where do i get the geoserver folder from?
[The geoserver folder to be hosted at 8080]

---
The link which you have shared has only 1 .terrain file. Does it contain offline elevation data for whole globe?

Thanks.

Rachel Hwang

unread,
May 22, 2017, 4:07:40 PM5/22/17
to cesium-dev
Hi there,


However, note that it's free for Internet use, but click on the individual datasets for information on offline terms of use. 

Hope that helps,
- Rachel

nigamr...@gmail.com

unread,
May 23, 2017, 5:31:11 AM5/23/17
to cesium-dev
Hi,
When i write below code:
        terrainProvider : new Cesium.CesiumTerrainProvider({
})

I can see map on the globe , but when i write below code:
 
var terrainProvider = new Cesium.GeoserverTerrainProvider({
      layerName: "SRTM90",
      styleName: "grayToColor",
      waterMask: true
})

Then i cant see neither map nor globe. Whole screen becomes black when i from switch from ol3 to ol3cesium using below code:
this.map = new ol.Map({

});

this.ol3d = new olcs.OLCesium({ map: this.map });

Why is it coming as black!

Guillaume Beraudo

unread,
May 23, 2017, 5:36:37 AM5/23/17
to Cesium Dev
Hi,

Have you tested the GeoserverTerrainProvider is working in a pure Cesium application?

Guillaume

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

nigamr...@gmail.com

unread,
May 23, 2017, 6:27:23 AM5/23/17
to cesium-dev
Hi,
No, I havent tested 'GeoserverTerrainProvider' on a pure cesium app. 
Actually my app is not purely cesium app, my app should support both ol3 and ol3cesium/cesium.
So, i have made a button, which allows switching from 2d to 3d mode (i.e. ol3 to ol3cesium mode). But now in the 3d, i.e. ol3cesium globe mode, I have to show elevations using offline data. For which i made the geoserver setup done.
But now the problem is coming up that earlier i was able to see the map using :
source: new ol.source.Stamen({
        layer: 'terrain'
      })
map in ol3 and when switching to ol3cesium i was able to see elevations using:
var terrainProvider = new Cesium.CesiumTerrainProvider({
    });
    scene.terrainProvider = terrainProvider;

BUT, now when i switch to ol3cesium i see blank screen , i cant see globe when i use:
 var terrainProvider = new Cesium.GeoserverTerrainProvider({
      layerName: "SRTM90",
      styleName: "grayToColor",
      waterMask: true
    });
  

Thanks.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.

Guillaume Beraudo

unread,
May 23, 2017, 7:45:12 AM5/23/17
to Cesium Dev
Hi,

Yes I understand your use case, I am the main dev of OL-Cesium.
Making sure the problem is not a pure Cesium bug would help analyze your issue.

Guillaume

To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.

nigamr...@gmail.com

unread,
May 23, 2017, 8:17:46 AM5/23/17
to cesium-dev
Hi Guillaume,

I solved the blank black screen problem by changing the code as below:

var globe = new Cesium.Globe(Cesium.Ellipsoid.WGS84);    
    var terrainProvider = new Cesium.GeoserverTerrainProvider({      
      //layerName: "SRTM90",
      //styleName: "grayToColor",
      waterMask: false
    });
    globe.terrainProvider = terrainProvider;

Am not sure if this is the correct way though.

BUT, i cant see any elevations ! What am i missing?
Please guide.

Guillaume Beraudo

unread,
May 23, 2017, 11:10:18 AM5/23/17
to Cesium Dev
Don't know.

Have you considered using https://github.com/geo-data/cesium-terrain-builder instead?

To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.

nigamr...@gmail.com

unread,
May 24, 2017, 8:17:18 AM5/24/17
to cesium-dev
I am trying to install cesium terrain builder, but getting an error of wanting gdal version 2.0.0 during setup.

I think using ctb i can convert .tif to .terrain and then use those .terrain files in my app. Right?

Guillaume Beraudo

unread,
May 24, 2017, 8:19:20 AM5/24/17
to Cesium Dev
Yes

To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.

nigamr...@gmail.com

unread,
May 26, 2017, 12:02:18 AM5/26/17
to cesium-dev
Hi Guillaume,

I have got the elevations of a particular region by hosting the .terrain files on a local server on my machine by below code:

var terrainProvider = new Cesium.CesiumTerrainProvider({
    });
    this.scene.terrainProvider = terrainProvider;

But now i dont want it from "server", but read directly from the local filesystem without server then what should be the code ?

nigamr...@gmail.com

unread,
Jun 7, 2017, 5:32:43 AM6/7/17
to cesium-dev
Please guide.. 
How to read directly from the local filesystem without server. What should be the code ?

Rachel Hwang

unread,
Jun 8, 2017, 10:05:59 AM6/8/17
to cesium-dev
The files must be hosted on a server in order for Cesium to access them -- this is just a general security feature of the browser.

Hope that helps,
- Rachel

nigamr...@gmail.com

unread,
Jun 9, 2017, 3:21:51 AM6/9/17
to cesium-dev
Hi Rachel,

My web app is already hosted on node server at 3005. So i wrote below code:

 var terrainProvider = new Cesium.CesiumTerrainProvider({
      url: './app/map/terrain_52_06'
    });
 this.scene.terrainProvider = terrainProvider;

I get to see elevations of that one area. BUT i can also see unwanted elevated spikes all over remaining world.
What could be the issue?



Rachel Hwang

unread,
Jun 9, 2017, 5:20:55 PM6/9/17
to cesium-dev
Hi there,

It looks like this might be either a server configuration problem, or a problem directly with your tileset. Unfortunately, this isn't enough information for us to help you diagnose your problems. I would recommend checking the rest of your setup, because I'm not sure this is a directly Cesium issue. If you narrow it down a little more, perhaps we could help answer more specific questions.

Hope that helps,
- Rachel

nigamr...@gmail.com

unread,
Jun 11, 2017, 10:47:26 AM6/11/17
to cesium-dev
Actually my app is running on node server (port 3005) and when i host terrain elevation data on tomcat (port 8080) and enable CORS, I get to see perfect elevations of my one area.
But when i don't use tomcat and host data from node server (port 3005) using code shared before, I can see unwanted elevated spikes.
Reply all
Reply to author
Forward
0 new messages