Hi Christian, The GDAL plugin was written to read basic image and height field data via GDAL rather than expose all the possible data. Potentially this could be added, but I you are the first I recall asking for it.
Robert. On 8 September 2015 at 15:12, Christian Buchner <christian.buch...@gmail.com > wrote: > 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 > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org