~ubuntu-branches/ubuntu/trusty/openscenegraph/trusty

« back to all changes in this revision

Viewing changes to OpenSceneGraph/src/osgPlugins/gdal/DataSetLayer.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Cyril Brulebois
  • Date: 2008-07-29 04:34:38 UTC
  • mfrom: (1.1.6 upstream) (2.1.3 lenny)
  • Revision ID: james.westby@ubuntu.com-20080729043438-no1h9h0dpsrlzp1y
* Non-maintainer upload.
* No longer try to detect (using /proc/cpuinfo when available) how many
  CPUs are available, fixing the FTBFS (due to -j0) on various platforms
  (Closes: #477353). The right way to do it is to support parallel=n in
  DEB_BUILD_OPTIONS (see Debian Policy §4.9.1), and adequate support has
  been implemented.
* Add patch to fix FTBFS due to the build system now refusing to handle
  whitespaces (Policy CMP0004 say the logs), thanks to Andreas Putzo who
  provided it (Closes: #482239):
   - debian/patches/fix-cmp0004-build-failure.dpatch
* Remove myself from Uploaders, as requested a while ago, done by Luk in
  his 2.2.0-2.1 NMU, which was never acknowledged.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 
 
1
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2007 Robert Osfield 
2
2
 *
3
3
 * This library is open source and may be redistributed and/or modified under  
4
4
 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 
32
32
DataSetLayer::DataSetLayer(const std::string& fileName):
33
33
_dataset(0), _gdalReader(0)
34
34
{
35
 
    openFile(fileName);
 
35
    setFileName(fileName);
 
36
    open();
36
37
}
37
38
 
38
39
DataSetLayer::DataSetLayer(const DataSetLayer& dataSetLayer,const osg::CopyOp& copyop):
39
 
ProxyLayer(dataSetLayer), _gdalReader(dataSetLayer._gdalReader)
 
40
    Layer(dataSetLayer), _gdalReader(dataSetLayer._gdalReader)
40
41
{
41
42
    if (dataSetLayer._dataset) open();
42
43
}
52
53
 
53
54
    if (getFileName().empty()) return;
54
55
 
 
56
 
 
57
    osg::notify(osg::NOTICE)<<"DataSetLayer::open()"<<getFileName()<<std::endl;
 
58
 
55
59
    _dataset = static_cast<GDALDataset*>(GDALOpen(getFileName().c_str(),GA_ReadOnly));
56
60
 
57
61
    setUpLocator();
59
63
 
60
64
void DataSetLayer::close()
61
65
{
 
66
    osg::notify(osg::NOTICE)<<"DataSetLayer::close()"<<getFileName()<<std::endl;
 
67
 
62
68
    if (_dataset)
63
69
    {
64
70
        GDALClose(static_cast<GDALDatasetH>(_dataset));