Changeset 906

Show
Ignore:
Timestamp:
03/25/08 16:58:40
Author:
robert
Message:

From Jason Beverage, "Here is a fix for the vertical scale issue I mentioned on osg-users yesterday. It applies the DataSet? vertical scale to any height value coming from GDAL like you suggested. I added a few more log messages about the scale as well, its up to you if you want to keep them or not."

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/vpb/SourceData.cpp

    r857 r906  
    930930                if (success) 
    931931                { 
    932                     log(osg::INFO,"We have Scale = %f",scale); 
     932                    log(osg::INFO,"We have Scale from GDALRasterBand = %f",scale); 
    933933                } 
    934                 else 
    935                 { 
    936                     scale = destination._dataSet->getVerticalScale(); 
    937                     log(osg::INFO,"We have no Scale from file so use DataSet vertical scale of %f",scale); 
    938  
    939                 } 
     934 
     935                float datasetScale = destination._dataSet->getVerticalScale(); 
     936                log(osg::INFO,"We have Scale from DataSet = %f",datasetScale); 
     937 
     938                scale *= datasetScale; 
     939                log(osg::INFO,"We have total scale = %f",scale); 
     940 
    940941 
    941942                log(osg::INFO,"********* getLinearUnits = %f",getLinearUnits(_cs.get()));