Removed gdal_priv.h from include/osgTerrain/DataSet to remove the external dependency on

GDAL.
This commit is contained in:
Robert Osfield 2004-10-28 07:00:55 +00:00
parent 61b0f5d301
commit 8dfea424c5
2 changed files with 9 additions and 7 deletions

View File

@ -34,10 +34,11 @@
#include <set>
#include <gdal_priv.h>
#include <osgTerrain/Export>
// forward declare so we can avoid tieing osgTerrain to GDAL.
class GDALDataset;
namespace osgTerrain
{
@ -131,11 +132,7 @@ class OSGTERRAIN_EXPORT DataSet : public osg::Referenced
_hasGCPs(false),
_gdalDataSet(0) {}
virtual ~SourceData()
{
if (_gdalDataSet) GDALClose(_gdalDataSet);
}
virtual ~SourceData();
static SourceData* readData(Source* source);

View File

@ -206,6 +206,11 @@ bool areCoordinateSystemEquivalent(const osg::CoordinateSystemNode* lhs,const os
return result ? true : false;
}
DataSet::SourceData::~SourceData()
{
if (_gdalDataSet) GDALClose(_gdalDataSet);
}
DataSet::SourceData* DataSet::SourceData::readData(Source* source)
{
if (!source) return 0;