Added automatic setting of the verical scale when the destination coordinate

system is geographic (i.e. lats and longs.).
This commit is contained in:
Robert Osfield 2004-07-07 11:28:21 +00:00
parent a3f7547cf7
commit 1634cc47c6

View File

@ -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())