ElevationLayer stopped working in latest version

classic Classic list List threaded Threaded
4 messages Options
adrianj adrianj
Reply | Threaded
Open this post in threaded view
|

ElevationLayer stopped working in latest version

Hello,

I have been using the following code in creating a base elevation layer. I recently upgraded to osgEarth 2.10.0 and now it does not work for this same file elevation file. Other elevation files work OK when using either version.

Are there any other parameters that I need to set in the latest version? Is there a way to determine if any errors have occurred in reading the file?

<nabble_embed> GDALOptions gdalOptBaseElevation; gdalOptBaseElevation.url() = "E:/Data/topography/topo15.grd"; _baseElevationLayer = new ElevationLayer("Base Elevation", gdalOptBaseElevation); _map->addLayer(_baseElevationLayer); </nabble_embed>

I am totally baffled why it was working with the older version but not with the newer version!

Many thanks for your help.

Adrian
gangzou gangzou
Reply | Threaded
Open this post in threaded view
|

Re: ElevationLayer stopped working in latest version


Maybe you should check new gdal library support grd format.
adrianj adrianj
Reply | Threaded
Open this post in threaded view
|

Re: ElevationLayer stopped working in latest version

In reply to this post by adrianj
I used gdalinfo to look at the file and I can see it is a NETCDF format.

This used to work with the older version so I believe it must be a dll that I don't have present or something like that.

I know that the netcdf.dll uses the following dlls and I have all these present.

hdf5.dll
hdf5_hl.dll
zlib1.dll

Is there anything else that I need to get the NETCDF format to work?? Is there any way to get some debug information from osgEarth as to why the file might not be loading? I have tried setting an environment variable in command prompt as below but that didn't change anything:

setx OSGEARTH_NOTIFY_LEVEL DEBUG

Many thanks for your help.

Adrian
adrianj adrianj
Reply | Threaded
Open this post in threaded view
|

Re: ElevationLayer stopped working in latest version

UPDATE
---------

I enabled OSGEarth debug and found that NETCDF was not a supported format. I then investigated the GDAL library and found that the default GDAL DLL does not have NETCDF enabled by default. I downloaded the right version, enabled the NETCDF in the nmake.opt file, recompiled and added that new DLL to my solution.

The elevation is now working again!

Many thanks for your help.

Adrian