From 1634cc47c6f0a82fbf312de4288f503161a2c0c8 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 7 Jul 2004 11:28:21 +0000 Subject: [PATCH] Added automatic setting of the verical scale when the destination coordinate system is geographic (i.e. lats and longs.). --- src/osgTerrain/DataSet.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/osgTerrain/DataSet.cpp b/src/osgTerrain/DataSet.cpp index dda7c530e..ff595def4 100644 --- a/src/osgTerrain/DataSet.cpp +++ b/src/osgTerrain/DataSet.cpp @@ -3238,6 +3238,13 @@ void DataSet::computeDestinationGraphFromSources(unsigned int numLevels) } + CoordinateSystemType destinateCoordSytemType = getCoordinateSystemType(_destinationCoordinateSystem.get()); + if (destinateCoordSytemType==GEOGRAPHIC && !getConvertFromGeographicToGeocentric()) + { + // convert elevation into degrees. + setVerticalScale(1.0f/111319.0f); + } + // get the extents of the sources and osg::BoundingBox extents(_extents); if (!extents.valid())