I followed all the instructions given for [GeoserverTerrainProvider](https://github.com/kaktus40/Cesium-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”,
– 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 !
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…
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/
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.
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/
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.
Le mercredi 30 septembre 2015 13:55:37 UTC+2, Parthesh Bulbule a
écrit :
> 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.
>
> Le mercredi 30 septembre 2015 06:06:29 UTC+2, Parthesh Bulbule a
écrit :
>
> > 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....
>
> >
>
> > On Wednesday, September 30, 2015 at 2:45:01 AM UTC+5:30,
bobac...@gmail.com <mailto:bobac…@gmail.com> wrote:Le mardi 29
septembre 2015 23:13:20 UTC+2, bobac...@gmail.com
<mailto:bobac…@gmail.com> a écrit :
>
> >
>
> >
>
> > > > 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 !
>
> >
>
> > >
>
> >
>
> > > Hello maybe you have a CORS issue
>
> >
>
> >
>
> >
>
> > you should see https://cesiumjs.org/2013/01/04/Cesium-Imagery-Layers-Tutorial/
>
> 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/
>
> --
>
> 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
<mailto:cesium-dev%2B…@googlegroups.com>.
>
> For more options, visit https://groups.google.com/d/optout.
Could you send me your server capabilities document?
--
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+unsubscribe@googlegroups.com
<mailto:cesium-dev%2Bunsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
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+unsubscribe@googlegroups.com <mailto:cesium-dev+unsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
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.
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](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
}));
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).
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