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
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to