<div dir="ltr"><div><div>Hi Christian,<br><br></div>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.<br></div><div><br></div>Robert.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 8 September 2015 at 15:12, Christian Buchner <span dir="ltr"><<a href="mailto:christian.buchner@gmail.com" target="_blank">christian.buchner@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi,<br><br></div>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<br><br>hf->setOrigin(osg::Vec3(BottomLeft[0],BottomLeft[1],0));<br>hf->setXInterval(sqrt(geoTransform[1]*geoTransform[1] + geoTransform[2]*geoTransform[2]));<br>hf->setYInterval(sqrt(geoTransform[4]*geoTransform[4] + geoTransform[5]*geoTransform[5]));<br>hf->setRotation(osg::Quat(rotation, osg::Vec3d(0.0, 0.0, 1.0)));<br><br></div>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.<br><br></div>I would propose that we set named properties like Origin, XInterval, YInterval, Rotation using the <a href="http://trac.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00530.html#a0ec078a3a1a1120ceb7c10fcf52da979" target="_blank">osg::Object->setUserValue()</a> member function as osg::Vec2 objects.<br><br></div><div>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<span class="HOEnZb"><font color="#888888"><br><br>Christian<br><br></font></span></div></div>
<br>_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
<br></blockquote></div><br></div>