From Antonoine Hue, a small modification to the osgTerrain::DataSet

to be able to pass an already opened GDAL Dataset to the
osgTerrain::DataSet::Source
This commit is contained in:
Robert Osfield
2005-12-07 15:26:45 +00:00
parent a72c697622
commit 73cc97f0e1
2 changed files with 13 additions and 5 deletions

View File

@@ -227,7 +227,9 @@ DataSet::SourceData* DataSet::SourceData::readData(Source* source)
case(Source::IMAGE):
case(Source::HEIGHT_FIELD):
{
GDALDataset* gdalDataSet = (GDALDataset*)GDALOpen(source->getFileName().c_str(),GA_ReadOnly);
GDALDataset* gdalDataSet = source->getGdalDataSet();
if(!gdalDataSet)
gdalDataSet = (GDALDataset*)GDALOpen(source->getFileName().c_str(),GA_ReadOnly);
if (gdalDataSet)
{
SourceData* data = new SourceData(source);