OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
GDALTypes.h
Go to the documentation of this file.
1 // This file is part of the GDAL OPeNDAP Adapter
2 
3 // Copyright (c) 2004 OPeNDAP, Inc.
4 // Author: Frank Warmerdam <warmerdam@pobox.com>
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 //
20 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
21 
22 #ifndef _GDALTypes_h
23 #define _GDALTypes_h 1
24 
25 #include <gdal.h>
26 
27 #include <Byte.h>
28 #include <UInt16.h>
29 #include <Int16.h>
30 #include <UInt32.h>
31 #include <Int32.h>
32 #include <Float32.h>
33 #include <Float64.h>
34 #include <Array.h>
35 #include <Grid.h>
36 
37 /************************************************************************/
38 /* GDALByte */
39 /************************************************************************/
40 
41 class GDALByte: public libdap::Byte {
42 public:
43  GDALByte(const string &n = "");
44  virtual ~GDALByte() {}
45 
46  virtual BaseType *ptr_duplicate();
47 
48  virtual bool read();
49 };
50 
51 /************************************************************************/
52 /* GDALUInt16 */
53 /************************************************************************/
54 
55 class GDALUInt16: public libdap::UInt16 {
56 public:
57  GDALUInt16(const string &n = "");
58  virtual ~GDALUInt16() {}
59 
60  virtual BaseType *ptr_duplicate();
61 
62  virtual bool read();
63 };
64 
65 /************************************************************************/
66 /* GDALInt16 */
67 /************************************************************************/
68 
69 class GDALInt16: public libdap::Int16 {
70 public:
71  GDALInt16(const string &n = "");
72  virtual ~GDALInt16() {}
73 
74  virtual BaseType *ptr_duplicate();
75 
76  virtual bool read();
77 };
78 
79 /************************************************************************/
80 /* GDALUInt32 */
81 /************************************************************************/
82 
83 class GDALUInt32: public libdap::UInt32 {
84 public:
85  GDALUInt32(const string &n = "");
86  virtual ~GDALUInt32() {}
87 
88  virtual BaseType *ptr_duplicate();
89 
90  virtual bool read();
91 };
92 
93 /************************************************************************/
94 /* GDALInt32 */
95 /************************************************************************/
96 
97 class GDALInt32: public libdap::Int32 {
98 public:
99  GDALInt32(const string &n = "");
100  virtual ~GDALInt32() {}
101 
102  virtual BaseType *ptr_duplicate();
103 
104  virtual bool read();
105 };
106 
107 /************************************************************************/
108 /* GDALFloat32 */
109 /************************************************************************/
110 
111 class GDALFloat32: public libdap::Float32 {
112 public:
113  GDALFloat32(const string &n = "");
114  virtual ~GDALFloat32() {}
115 
116  virtual BaseType *ptr_duplicate();
117 
118  virtual bool read();
119 };
120 
121 /************************************************************************/
122 /* GDALFloat64 */
123 /************************************************************************/
124 
125 class GDALFloat64: public libdap::Float64 {
126 public:
127  GDALFloat64(const string &n = "");
128  virtual ~GDALFloat64() {}
129 
130  virtual BaseType *ptr_duplicate();
131 
132  virtual bool read();
133 };
134 
135 /************************************************************************/
136 /* GDALArray */
137 /************************************************************************/
138 
139 class GDALArray: public libdap::Array {
140  string filename;
141  GDALRasterBandH hBand;
142  GDALDataType eBufType;
143 
144  void m_duplicate(const GDALArray &a);
145 
146 public:
147  GDALArray(const string &n = "", BaseType *v = 0);
148  // Added for DAP4 support. jhrg 8/26/14
149  GDALArray(const string &name, BaseType *proto, const string &filenameIn, GDALRasterBandH hBandIn, GDALDataType eBufTypeIn);
150  GDALArray(const GDALArray &src);
151  virtual ~GDALArray();
152 
153  virtual BaseType *ptr_duplicate();
154 
155  virtual bool read();
156 };
157 
158 /************************************************************************/
159 /* GDALGrid */
160 /************************************************************************/
161 
162 class GDALGrid: public libdap::Grid {
163 
164  GDALRasterBandH hBand;
165  GDALDataType eBufType;
166  string filename;
167 
168  void m_duplicate(const GDALGrid &g);
169 
170 public:
171  GDALGrid(const GDALGrid &rhs);
172  GDALGrid(const string &filenameIn, const string &name, GDALRasterBandH hBandIn, GDALDataType eBufTypeIn);
173  virtual ~GDALGrid();
174 
175  GDALGrid &operator=(const GDALGrid &rhs);
176 
177  virtual BaseType *ptr_duplicate();
178 
179  virtual bool read();
180 };
181 
182 #endif // ndef _GDALTypes_h
183 
184 
virtual BaseType * ptr_duplicate()
Definition: GDALArray.cc:54
virtual BaseType * ptr_duplicate()
Definition: GDALTypes.cc:61
virtual BaseType * ptr_duplicate()
Definition: GDALTypes.cc:44
virtual ~GDALFloat64()
Definition: GDALTypes.h:128
virtual bool read()
Definition: GDALTypes.cc:49
GDALArray(const string &n="", BaseType *v=0)
virtual ~GDALArray()
Definition: GDALArray.cc:75
virtual BaseType * ptr_duplicate()
Definition: GDALTypes.cc:171
GDALFloat32(const string &n="")
Definition: GDALTypes.cc:143
virtual bool read()
Definition: GDALTypes.cc:66
virtual bool read()
Definition: GDALTypes.cc:154
virtual ~GDALInt32()
Definition: GDALTypes.h:100
virtual ~GDALByte()
Definition: GDALTypes.h:44
virtual BaseType * ptr_duplicate()
Definition: GDALTypes.cc:83
virtual BaseType * ptr_duplicate()
Definition: GDALGrid.cc:56
virtual BaseType * ptr_duplicate()
Definition: GDALTypes.cc:149
virtual ~GDALUInt32()
Definition: GDALTypes.h:86
GDALGrid & operator=(const GDALGrid &rhs)
Definition: GDALGrid.cc:76
virtual BaseType * ptr_duplicate()
Definition: GDALTypes.cc:105
virtual bool read()
Definition: GDALTypes.cc:176
virtual ~GDALFloat32()
Definition: GDALTypes.h:114
GDALUInt32(const string &n="")
Definition: GDALTypes.cc:99
GDALGrid(const GDALGrid &rhs)
Definition: GDALGrid.cc:71
GDALInt32(const string &n="")
Definition: GDALTypes.cc:121
virtual BaseType * ptr_duplicate()
Definition: GDALTypes.cc:127
GDALUInt16(const string &n="")
virtual ~GDALInt16()
Definition: GDALTypes.h:72
GDALFloat64(const string &n="")
Definition: GDALTypes.cc:165
virtual bool read()
Definition: GDALArray.cc:80
virtual ~GDALUInt16()
Definition: GDALTypes.h:58
virtual bool read()
Definition: GDALTypes.cc:110
GDALInt16(const string &n="")
Definition: GDALTypes.cc:77
GDALByte(const string &n="")
Definition: GDALTypes.cc:38
virtual bool read()
Definition: GDALTypes.cc:132
virtual ~GDALGrid()
Definition: GDALGrid.cc:85
virtual bool read()
Definition: GDALTypes.cc:88
virtual bool read()
Definition: GDALGrid.cc:89