GeoserverTerrainProvider plugin displays completely black tiles at terrain data area

388 views
Skip to first unread message

Parthesh Bulbule

unread,
Sep 29, 2015, 3:16:51 AM9/29/15
to cesium-dev


             I followed all the instructions given for GeoserverTerrainProvider plugin. I am using SRTM 90m data for all of India to produce terrain. So as per instructions for SRTM data,
-- I used gdal_retile in Osgeo shell to produce tiles
           used the following commands in Osgeo shell:
          
mkdir indiapyramid1
gdal_retile
.py -v -r bilinear -levels 4 -ps 2048 2048 -co "TILED=YES" -targetDir indiapyramid1 india.tif

-- Then I created coverage store with "Imagepyramid" plugin in geoserver and added raster source as the tileset created by gdal_retile and published the layer. Thus generating pyramid using this link.
  

-- My pseudo code for terrain provider is as follows:

var viewer = new Cesium.CesiumWidget('cesiumContainer');
var terrainProvider = new Cesium.GeoserverTerrainProvider({
        proxy
: new Cesium.DefaultProxy('proxy.php'),
       
//service : "WMS",
        url
: "http://localhost:10000/geoserver/elevation/wms",
       
        layerName
: "indiapyramid1",
       
//hasStyledImage: false,
       
//styleName:"grayToColor"
       
//waterMask:true
   
});
   
   
    viewer
.terrainProvider = terrainProvider;


-- I am getting this output.(screenshot).
   The tiles keep on appearing but changing location within the same bounding box of the DEM data.
   But when I zoom into the globe I am not getting 3D terrain view. As you can see in this screenshot.

-- Using styled geotiff and converted geotiff also results into same output.
   I am not understanding where I am wrong. Help needed !






bobac...@gmail.com

unread,
Sep 29, 2015, 5:13:20 PM9/29/15
to cesium-dev
Hello maybe you have a CORS issue

bobac...@gmail.com

unread,
Sep 29, 2015, 5:15:01 PM9/29/15
to cesium-dev, bobac...@gmail.com

Parthesh Bulbule

unread,
Sep 30, 2015, 12:06:29 AM9/30/15
to cesium-dev, bobac...@gmail.com
Actually "bobac", I am not trying to layer imagery. I am trying to load terrain data from my own source i.e. from geoserver on to the cesium globe. I am having trouble following these instructions. I went through the link that you mentioned, but did not find it useful in this regard. If you could help me fix the problem I showed....

bobac...@gmail.com

unread,
Sep 30, 2015, 12:19:18 AM9/30/15
to cesium-dev, bobac...@gmail.com
Sorry there was a lack of precision. An imageLayer and geoserverTerrainProvider retrieve image data from a server in the same way. If your provider (here geoserver or your java application server) doesn't "trust" your cesium application, the CORS mechanism restricted the access to the resource. You should see http://enable-cors.org/

Parthesh Bulbule

unread,
Sep 30, 2015, 7:55:37 AM9/30/15
to cesiu...@googlegroups.com
But it is possible to get other imagery from my geoserver on the cesium globe. You can see the screenshot here. So, I don't think it is a CORS problem.


--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/DYrbRcljse8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

bobac...@gmail.com

unread,
Sep 30, 2015, 3:54:52 PM9/30/15
to cesium-dev
Could you send me your server capabilities document?

Parthesh Bulbule

unread,
Oct 1, 2015, 12:20:19 AM10/1/15
to cesiu...@googlegroups.com
I don't know what you mean by server capabilities document, but following is the link to the user manual of Geoserver 2.6.2 that I am using for my purpose --> http://docs.geoserver.org/2.6.2/user/
 You can check it out.

bobactor

unread,
Oct 1, 2015, 12:48:13 AM10/1/15
to cesiu...@googlegroups.com
Geoserver.png

Parthesh Bulbule

unread,
Oct 1, 2015, 2:27:51 AM10/1/15
to cesiu...@googlegroups.com
Attached.
getcapabilities_1.1.1.xml
getcapabilities_1.3.0.xml

bobactor

unread,
Oct 1, 2015, 5:34:32 AM10/1/15
to cesiu...@googlegroups.com
For me, the capabilities document it's OK. Could you oversee your javascript console and show me the result?
Capture.png

Parthesh Bulbule

unread,
Oct 6, 2015, 12:13:10 AM10/6/15
to cesiu...@googlegroups.com
Sorry for the delay, was caught up into something...

I have attached some details you might be interested in along with the js console.... Have a look.

-- The dem layer preview on geoserver
-- Tileset and image formed after gdal retile and publishing layer in geoserver using imagepyramid plugin
-- The js console
indiapyramid1.png
inside_source.png
js.png
source.png

bobactor

unread,
Oct 12, 2015, 12:34:40 PM10/12/15
to cesiu...@googlegroups.com
Hello,
I saw you use defaultProxy. I'd like to see your javascript log (see ceiusmJs.png) and your network log (see elevation.png)
elevation.png
cesiumJs.png

Parthesh Bulbule

unread,
Oct 16, 2015, 2:38:19 AM10/16/15
to cesiu...@googlegroups.com
Hi there,

      I think that there is some problem in my proxy.php file since I am not able to get the bil images on cesium globe which you can see from the screenshot of network log. Have a look at the attachments. I am also attaching the proxy.php file that I am using. Please tell me if some changes will be required.
proxy_issue.png
terrain_ready_true.png
proxy.php

Parthesh Bulbule

unread,
Oct 16, 2015, 4:55:04 AM10/16/15
to cesiu...@googlegroups.com
I don't understand what is wrong... If I directly add the image layer from the geoserver of the image pyramid created, I can see it on the globe (PS: indiapyramid.png ) .

Following is my code:


    var viewer = new Cesium.CesiumWidget('cesiumContainer');

            // LOAD LAYER
    var url='http://localhost:10000/geoserver/wms'; //Geoserver URL
    var layers = viewer.scene.globe.imageryLayers;
    layers.removeAll();
    layers.addImageryProvider(new Cesium.WebMapServiceImageryProvider({

        proxy : new Cesium.DefaultProxy('proxy.php'),
        url : url,       
        layers: 'indiapyramid1'  // Layer name from geoserver
    }));
indiapyramid.png

bobactor

unread,
Oct 17, 2015, 11:22:52 AM10/17/15
to cesiu...@googlegroups.com
Hello,
from your attachments, I saw some strange things:
  • Why your data type is xml instead of bil?!?
  • The sizes of your data is very low (0.53 KB instead of  8 KB for example)
 Your proxy seems to work for xml files becaus the plugin can retrieve the capabilities file from geoserver (terrain_ready_true.png).
Did you install bil/DDS plugin in geoserver?

Parthesh Bulbule

unread,
Oct 19, 2015, 1:07:27 AM10/19/15
to cesiu...@googlegroups.com
There is a new development. I was able to get the terrain.
-- I created a layer of TrueMarble global image in geoserver
-- Removed the reference proxy.php by commenting it
-- Removed all image layers using:
    var layers = viewer.scene.globe.imageryLayers;
    layers.removeAll();

-- Inserted the TrueMarble image:
   layers.addImageryProvider(new Cesium.WebMapServiceImageryProvider({
        url : "http://localhost:10000/geoserver/elevation/wms",        
        layers: 'TrueMarble'
    }));

-- Then used:
    var terrainProvider = new Cesium.GeoserverTerrainProvider({
        layerName: "indiapyramid1",
    });
viewer.terrainProvider = terrainProvider;


And there it was... Have attached the image... The resolution of the image is very less. Although you can see the terrain


But now the problem is I am not able to get any resources from the internet.. I would really like the proxy issue to be resolved.
Or it will be great if you could tell me any other alternative.
truemarble_terrain.png

bobactor

unread,
Oct 19, 2015, 3:10:55 AM10/19/15
to cesiu...@googlegroups.com
If I understand your use case, you'll need to use a proxy to access geoserver via internet?

Parthesh Bulbule

unread,
Oct 19, 2015, 7:17:26 AM10/19/15
to cesiu...@googlegroups.com
Yes, and not only geoserver, any other online resource like imagery or tile services etc.

bobactor

unread,
Oct 19, 2015, 10:58:29 AM10/19/15
to cesiu...@googlegroups.com
OK, it seems the proxy function is in cause (from the plugin or from your proxy?). Did you try to analyse the URL created by the plugin?
Capture.png
Reply all
Reply to author
Forward
0 new messages