bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
FONgType.h
1// FONgType.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 FONgType_h_
26#define FONgType_h_ 1
27
28#include <set>
29
30#include <BESObj.h>
31
32#include <libdap/Type.h>
33
34class FONgTransform;
35
36namespace libdap {
37 class DDS;
38 class Grid;
39 class Array;
40}
41
48class FONgType: public BESObj {
49protected:
50 std::string d_name;
51 libdap::Type d_type;
52
53private:
54 libdap::Grid *d_grid;
55 libdap::Array *d_lat, *d_lon;
56
57 // Sets of string values used to find stuff in attributes
58 std::set<std::string> d_coards_lat_units;
59 std::set<std::string> d_coards_lon_units;
60
61 std::set<std::string> d_lat_names;
62 std::set<std::string> d_lon_names;
63
64 bool m_lat_unit_or_name_match(const std::string &var_units, const std::string &var_name, const std::string &long_name);
65 bool m_lon_unit_or_name_match(const std::string &var_units, const std::string &var_name, const std::string &long_name);
66
67public:
68 FONgType(libdap::Grid *g);
69
70 virtual ~FONgType() {}
71
72 virtual std::string name() { return d_name; }
73 virtual void set_name(const std::string &n) { d_name = n; }
74
75 virtual libdap::Type type() { return d_type; }
76 virtual void set_type(libdap::Type t) { d_type = t; }
77
78 virtual void extract_coordinates(FONgTransform &t);
79
81 virtual std::string get_projection(libdap::DDS *dds);
82
84 virtual double *get_data();
85
86 virtual void dump(std::ostream &) const {};
87
88 libdap::Grid *grid() { return d_grid; }
89
90 bool find_lat_lon_maps();
91
92};
93
94#endif // FONgType_h_
95
top level BES object to house generic methods
Definition BESObj.h:54
Transformation object that converts an OPeNDAP DataDDS to a GeoTiff file.
virtual void dump(std::ostream &) const
dump the contents of this object to the specified ostream
Definition FONgType.h:86
virtual double * get_data()
Get the data values for the band(s). Call must delete.
virtual std::string get_projection(libdap::DDS *dds)
Get the GDAL/OGC WKT projection string.