bes  Updated for version 3.17.4
reproj_functions.h
1 
2 // -*- mode: c++; c-basic-offset:4 -*-
3 
4 // This file is part of libdap, A C++ implementation of the OPeNDAP Data
5 // Access Protocol.
6 
7 // Copyright (c) 2002,2003 OPeNDAP, Inc.
8 // Author: James Gallagher <jgallagher@opendap.org>
9 //
10 // This library is free software; you can redistribute it and/or
11 // modify it under the terms of the GNU Lesser General Public
12 // License as published by the Free Software Foundation; either
13 // version 2.1 of the License, or (at your option) any later version.
14 //
15 // This library is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 //
24 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
25 
26 // (c) COPYRIGHT URI/MIT 1999
27 // Please read the full copyright statement in the file COPYRIGHT_URI.
28 //
29 // Authors:
30 // jhrg,jimg James Gallagher <jgallagher@gso.uri.edu>
31 
32 // Declarations for CE functions.
33 //
34 // 1/15/99 jhrg
35 
36 #ifndef _reproj_functions_h
37 #define _reproj_functions_h
38 
39 #include "BESAbstractModule.h"
40 #include "ServerFunction.h"
41 #include "ServerFunctionsList.h"
42 
43 namespace libdap {
44 
45 void function_swath2array(int argc, BaseType * argv[], DDS &, BaseType **btpp);
46 void function_swath2grid(int argc, BaseType * argv[], DDS &, BaseType **btpp);
47 
48 
49 class SwathToGrid: public libdap::ServerFunction {
50 public:
51  SwathToGrid()
52  {
53  setName("swath2grid");
54  setDescriptionString("This function echos back it's arguments as DAP data.");
55  setUsageString("swath2grid(dataArray, latitudeArray, longitudeArray)");
56  setRole("http://services.opendap.org/dap4/server-side-function/swath2grid");
57  setDocUrl("http://docs.opendap.org/index.php/Server_Side_Processing_Functions#swath2grid");
58  setFunction(libdap::function_swath2grid);
59  setVersion("1.0");
60  }
61  virtual ~SwathToGrid()
62  {
63  }
64 
65 };
66 
67 class SwathToArray: public libdap::ServerFunction {
68 public:
69  SwathToArray()
70  {
71  setName("swath2array");
72  setDescriptionString("This function echos back it's arguments as DAP data.");
73  setUsageString("swath2array(dataArray, latitudeArray, longitudeArray)");
74  setRole("http://services.opendap.org/dap4/server-side-function/swath2array");
75  setDocUrl("http://docs.opendap.org/index.php/Server_Side_Processing_Functions#swath2array");
76  setFunction(libdap::function_swath2array);
77  setVersion("1.0");
78  }
79  virtual ~SwathToArray()
80  {
81  }
82 
83 };
84 
85 
87 public:
89  {
90  libdap::ServerFunctionsList::TheList()->add_function(new libdap::SwathToGrid());
91 
92  libdap::ServerFunctionsList::TheList()->add_function(new libdap::SwathToArray());
93 
94  }
95  virtual ~ReProjectionFunctions()
96  {
97  }
98  virtual void initialize(const string &modname);
99  virtual void terminate(const string &modname);
100 
101  virtual void dump(ostream &strm) const;
102 };
103 
104 
105 
106 
107 } // namespace libdap
108 
109 #endif // _reproj_functions_h