[osg-users] Accessing georegistered images via GDAL plug-in - too many limitations...
Robert Osfield
robert.osfield at gmail.com
Tue Sep 8 07:33:50 PDT 2015
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.buchner at 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 at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150908/2ff21dfc/attachment-0003.htm>
More information about the osg-users
mailing list