Hi Jason,

There isn't any setting to control whether the vertical scale should
be used to override any one read from GDAL, so if wanted to add
another bit of control logic using whether the vertical scale has been
set you'd first need to add such an option.

Perhaps a better route would be to scale any scale read from GDAL with
the DataSet scale.  Since both are normally one everything should be
sane.  It'd also work with the concept that the DataSet scale, scales
all heights in the scene, rather than replacing a scale.

Feel free to code up a solution.

Robert.

On Mon, Mar 24, 2008 at 7:00 PM, Jason Beverage <[EMAIL PROTECTED]> wrote:
> 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.cpp
> that 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
>  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

Reply via email to