diff --git a/src/osgTerrain/DataSet.cpp b/src/osgTerrain/DataSet.cpp index 1d9ca48b9..5bae2f584 100644 --- a/src/osgTerrain/DataSet.cpp +++ b/src/osgTerrain/DataSet.cpp @@ -3470,10 +3470,9 @@ osg::Node* DataSet::decorateWithCoordinateSystemNode(osg::Node* subgraph) if (_destinationCoordinateSystem->getCoordinateSystem().empty()) return subgraph; - osg::CoordinateSystemNode* csn = new osg::CoordinateSystemNode; - - // copy the destinate coordinate system string. - csn->setCoordinateSystem(_destinationCoordinateSystem->getCoordinateSystem()); + osg::CoordinateSystemNode* csn = new osg::CoordinateSystemNode( + _destinationCoordinateSystem->getFormat(), + _destinationCoordinateSystem->getCoordinateSystem()); // set the ellipsoid model if geocentric coords are used. if (getConvertFromGeographicToGeocentric()) csn->setEllipsoidModel(getEllipsoidModel());