root/OpenSceneGraph/trunk/src/osgPlugins/gdal/DataSetLayer.h @ 13041

Revision 13041, 1.8 kB (checked in by robert, 2 years ago)

Ran script to remove trailing spaces and tabs

  • Property svn:eol-style set to native
Line 
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2007 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version.  The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 * OpenSceneGraph Public License for more details.
12*/
13
14#ifndef DATASETLAYER
15#define DATASETLAYER 1
16
17#include <osgTerrain/Layer>
18#include <osgDB/ReaderWriter>
19
20#include <gdal_priv.h>
21
22namespace GDALPlugin {
23
24class DataSetLayer : public osgTerrain::Layer
25{
26    public:
27
28        DataSetLayer();
29
30        DataSetLayer(const std::string& fileName);
31
32        /** Copy constructor using CopyOp to manage deep vs shallow copy.*/
33        DataSetLayer(const DataSetLayer& dataSetLayer,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
34
35        META_Object(GDALPlugin, DataSetLayer);
36
37        virtual bool isOpen() const { return _dataset!=0; }
38
39        virtual void open();
40
41        virtual void close();
42
43        virtual unsigned int getNumColumns() const;
44
45        virtual unsigned int getNumRows() const;
46
47        virtual osgTerrain::ImageLayer* extractImageLayer(unsigned int sourceMinX, unsigned int sourceMinY, unsigned int sourceMaxX, unsigned int sourceMaxY, unsigned int targetWidth=0, unsigned int targetHeight=0);
48
49        void setGdalReader(const osgDB::ReaderWriter* rw);
50
51    protected:
52
53        virtual ~DataSetLayer();
54
55        void setUpLocator();
56
57        GDALDataset* _dataset;
58
59        osgDB::ReaderWriter* _gdalReader;
60
61
62};
63
64}
65
66#endif
Note: See TracBrowser for help on using the browser.