[osg-users] Accessing georegistered images via GDAL plug-in - too many limitations...
Christian Buchner
christian.buchner at gmail.com
Tue Sep 8 07:12:39 PDT 2015
Hi,
while height fields loaded via the GDAL plug-in get their coordinate origin
and x/y extents as well as rotation set correctly via the following code in
ReaderWriterGDAL.cpp
hf->setOrigin(osg::Vec3(BottomLeft[0],BottomLeft[1],0));
hf->setXInterval(sqrt(geoTransform[1]*geoTransform[1] +
geoTransform[2]*geoTransform[2]));
hf->setYInterval(sqrt(geoTransform[4]*geoTransform[4] +
geoTransform[5]*geoTransform[5]));
hf->setRotation(osg::Quat(rotation, osg::Vec3d(0.0, 0.0, 1.0)));
there appears to be no comparable facility to the GDAL plugin's image
loader. All that will be returned is an osg::Image without any geo
referencing data - if I understand the code correctly.
I would propose that we set named properties like Origin, XInterval,
YInterval, Rotation using the osg::Object->setUserValue()
<http://trac.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00530.html#a0ec078a3a1a1120ceb7c10fcf52da979>
member function as osg::Vec2 objects.
Also it would appear that the GDALDataset (which is a derived class of
osgTerrain::Layer) is not accessible to the caller (user) of the GDAL
plug-in. It would be nice if there was a facility to somehow access this
dataset ptr through an API - as this object contains all the georeferencing
information equired to slap this piece of data onto an OSGTerrain::Terrain
Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150908/c5d597f8/attachment-0002.htm>
More information about the osg-users
mailing list