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 an ElevationLayer successfully for a long time using the code below and version 2.9.0. I recently upgraded to 2.10.2 and now my elevation no longer works. Should the code be the same? Has anything changed in the latest versions that will likely cause my code to stop working?

GDALOptions gdalOptBaseElevation;
gdalOptBaseElevation.url() = settingPtr->getBaseElevationURL();
if (settingPtr->getElevationProfile().length() > 0)
        gdalOptBaseElevation.profile()->srsString() = settingPtr->getElevationProfile();
_baseElevationLayer = new ElevationLayer("Base Elevation", gdalOptBaseElevation);
_map->addLayer(_baseElevationLayer);


Where my "URL" is set to: "C:\\topography\\topo15.grd"
And my elevation profile  is set to: "+proj=longlat +ellps=WGS84 +datum=WGS84"

I am including the new version of gdal204.dll instead of gdal201.dll.

What else could be wrong?

Many thanks for your help!!

Adrian

gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: ElevationLayer stopped working in latest version

Hi Adrian,
Does the osgearth_map example work? Does it load elevation data successfully for you?
Glenn Waldron / Pelican Mapping
nmielcarek nmielcarek
Reply | Threaded
Open this post in threaded view
|

Re: ElevationLayer stopped working in latest version

Hi Glenn,

My elevation data appears to have broken also within the past month or so.

tms elevation data works fine, but the gdal driver doesn't load any local data files.

To test, you can try the following earth file:

<map name="ElevTesting" type="geocentric" version="2">
    <image name="readymap_imagery" driver="tms">
        <url>http://readymap.org/readymap/tiles/1.0.0/22/</url>
    </image>
    <elevation name="readymap_elevation" driver="gdal">
        <url>../data/terrain/mt_rainier_90m.tif</url>
    </elevation>
    <viewpoint name="Mt Rainier" heading="17.3352" height="2462.6" lat="46.82181702111031" long="-121.7814936386096" pitch="-21.3" range="23926.0" />
</map>
nmielcarek nmielcarek
Reply | Threaded
Open this post in threaded view
|

Re: ElevationLayer stopped working in latest version

Nevermind about my last comment. That elevation file just took a while to load but eventually appeared.

Maybe the issue I'm having is with the .IMG files we're using, which I'll investigate.

Thanks,
Nathan