[osg-users] VirtualPlanetBuilder vertical scale being ignored
Jason Beverage
jasonbeverage at gmail.com
Mon Mar 24 12:00:16 PDT 2008
Hi Robert,
I was just playing with the new version of VirtualPlanetBuilder from SVN and
I noticed that the vertical scale is ignored when it is set via the
commandline or automatically in the prepareForDestinationGraphCreation
method in Dataset.cpp when the destination coordinate system is GEOGRAPHIC
and you are not exporting a geocentric database (scaling meters to degrees).
The issue stems from the block of code in readHeightField in
SourceData.cppthat first attempts to get the scale from the
GDALRasterBand and then tries
to fall back to the DataSet's vertical scale if there is no scale in the
GDALRasterBand. I believe that most GDAL drivers will just return 1 with
success being true, so the code to check the vertical scale from the DataSet
is never called. This means you get the typical spiky osgdem output in
which X and Y are in degrees and Z is in meters.
One way that this could be fixed is to first check the Dataset to see if a
vertical scale has been set and then fall back to the GDALRasterBand scale.
Thanks!
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080324/5dc98829/attachment.html
More information about the osg-users
mailing list