[osg-users] Add fixed vertical offset to survey layer

Adrian Jelffs adrian.jelffs at makai.com
Mon Jan 29 15:04:46 PST 2018


I have an application where I have a base layer and a survey layer overload using OSG Earth. I then add other objects on top.

I would like to change my survey layer to have a fixed vertical offset of -1m. Basically lowering the survey layer so the other objects don't sit exactly on the surface. It has to be this way around as the position of the objects is more important relative to other items than to the survey layer. 

What is the best method to do this? Could somebody provide a simple code example? This is my current code:


osgEarth::MapOptions mapOptions;
mapOptions.coordSysType() = osgEarth::MapOptions::CSTYPE_GEOCENTRIC;
_map = new osgEarth::Map(mapOptions);

GDALOptions gdalOptElevation;
gdalOptElevation.url() = url;
elevationLayer = new ElevationLayer(name, gdalOptElevation);

Many thanks for your help!


Read this topic online here:

More information about the osg-users mailing list