Multiple Drivers for DEM

classic Classic list List threaded Threaded
1 message Options
marcoma9023 marcoma9023
Reply | Threaded
Open this post in threaded view
|

Multiple Drivers for DEM

Hello,

Currently I can get the elevation data in three ways:
1) Through TMSOptions driver that points to the url http://readymap.org/readymap/tiles/1.0.0/116/
2) Through GDALOptions, which reads .hgt files locally.
3) Through GDALOptions, which reads .tif files locally for bathymetry.

Since, for me it is very important to have a correct and most accurate elevation data on the sea and near the land, I noticed that option 1 is not satisfactory, while option 3 is.
However, option 3 is not accurate on dry land.

Also, my problem is that if I run both drivers at the same time, only TMSOptions works, while the others are stopped.

TMSOptions elevationOption;
elevationOption.url() = ELEVATION_URL;
map->addLayer(new ElevationLayer("Elevation", elevationOption));

GDALOptions gdal;
gdal.url() = std::string(resources_url + "/Layers/DEM");
gdal.extensions() = "DEM";
osg::ref_ptr <ElevationLayer> eleLayer = new ElevationLayer("Elevation", gdal);
eleLayer->getCacheSettings()->cachePolicy() = osgEarth::CachePolicy::Usage::USAGE_READ_WRITE;
eleLayer->getCacheSettings()->setCache(cache);
map->addLayer(eleLayer);

What am I missing?