OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
FONgGrid.h
Go to the documentation of this file.
1 // FONgGrid.h
2 
3 // This file is part of BES GDAL File Out Module
4 
5 // Copyright (c) 2012 OPeNDAP, Inc.
6 // Author: James Gallagher <jgallagher@opendap.org>
7 //
8 // This library is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Lesser General Public
10 // License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 //
22 // You can contact University Corporation for Atmospheric Research at
23 // 3080 Center Green Drive, Boulder, CO 80301
24 
25 #ifndef FONgGrid_h_
26 #define FONgGrid_h_ 1
27 
28 class FONgTransform;
29 class FONgBaseType;
30 
31 namespace libdap {
32  class Grid;
33  class Array;
34 }
35 
50 class FONgGrid: public FONgBaseType {
51 private:
52  libdap::Grid *d_grid;
53  libdap::Array *d_lat, *d_lon;
54 
55  // Sets of string values used to find stuff in attributes
56  set<string> d_coards_lat_units;
57  set<string> d_coards_lon_units;
58 
59  set<string> d_lat_names;
60  set<string> d_lon_names;
61 
62  bool m_lat_unit_or_name_match(const string &var_units, const string &var_name, const string &long_name);
63  bool m_lon_unit_or_name_match(const string &var_units, const string &var_name, const string &long_name);
64 
65 public:
66  FONgGrid(libdap::Grid *g);
67  virtual ~FONgGrid();
68 
69  libdap::Grid *grid() { return d_grid; }
70 
71  bool find_lat_lon_maps();
72 
73  virtual void extract_coordinates(FONgTransform &t);
74  string get_projection(libdap::DDS *dds);
75  virtual double *get_data();
76 
77 };
78 
79 #endif // FONgGrid_h_
virtual ~FONgGrid()
Destructor that cleans up the grid.
Definition: FONgGrid.cc:84
FONgGrid(libdap::Grid *g)
Constructor for FONgGrid that takes a DAP Grid.
Definition: FONgGrid.cc:50
A DAP Grid with file out netcdf information included.
Definition: FONgGrid.h:50
string get_projection(libdap::DDS *dds)
Set the projection information For Grids, look for CF information.
Definition: FONgGrid.cc:307
bool find_lat_lon_maps()
A private method called by the constructor that searches for latitude and longitude map vectors...
Definition: FONgGrid.cc:149
static class NCMLUtil overview
virtual double * get_data()
Get the data values for the band(s). Call must delete.
Definition: FONgGrid.cc:350
A DAP BaseType with file out gdal information included.
Definition: FONgBaseType.h:38
virtual void extract_coordinates(FONgTransform &t)
Extract the size (pixels), element data type and top-left and bottom-right lat/lon corner points for ...
Definition: FONgGrid.cc:212
libdap::Grid * grid()
Definition: FONgGrid.h:69
Transformation object that converts an OPeNDAP DataDDS to a GeoTiff file.
Definition: FONgTransform.h:41