GammaLib  2.1.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GWcsGLS.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  * GWcsGLS.hpp - Global Sinusoidal (GLS) projection class *
3  * ----------------------------------------------------------------------- *
4  * copyright (C) 2017 by Juergen Knoedlseder *
5  * ----------------------------------------------------------------------- *
6  * *
7  * This program is free software: you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation, either version 3 of the License, or *
10  * (at your option) any later version. *
11  * *
12  * This program is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public License *
18  * along with this program. If not, see <http://www.gnu.org/licenses/>. *
19  * *
20  ***************************************************************************/
21 /**
22  * @file GWcsGLS.hpp
23  * @brief Global Sinusoidal (GLS) projection class definition
24  * @author Juergen Knoedlseder
25  */
26 
27 #ifndef GWCSGLS_HPP
28 #define GWCSGLS_HPP
29 
30 /* __ Includes ___________________________________________________________ */
31 #include <string>
32 #include "GWcsSFL.hpp"
33 
34 
35 /***********************************************************************//**
36  * @class GWcsGLS
37  *
38  * @brief Global Sinusoidal (GLS) projection class definition
39  *
40  * This class implements the Global Sinusoidal projection for the World
41  * Coordinate System. The Global Sinusoidal projection is an alias of the
42  * Sanson-Flamsteed projection, and the GWcsGLS therefore derives from the
43  * GWcsSFL class.
44  ***************************************************************************/
45 class GWcsGLS : public GWcsSFL {
46 
47 public:
48  // Constructors and destructors
49  GWcsGLS(void);
50  GWcsGLS(const std::string& coords,
51  const double& crval1, const double& crval2,
52  const double& crpix1, const double& crpix2,
53  const double& cdelt1, const double& cdelt2);
54  GWcsGLS(const GWcsGLS& wcs);
55  virtual ~GWcsGLS(void);
56 
57  // Operators
58  GWcsGLS& operator=(const GWcsGLS& wcs);
59 
60  // Implemented pure virtual base class methods
61  virtual void clear(void);
62  virtual GWcsGLS* clone(void) const;
63  virtual std::string classname(void) const;
64  virtual std::string code(void) const;
65  virtual std::string name(void) const;
66  virtual std::string print(const GChatter& chatter = NORMAL) const;
67 
68 protected:
69  // Private methods
70  void init_members(void);
71  void copy_members(const GWcsGLS& wcs);
72  void free_members(void);
73 };
74 
75 
76 /***********************************************************************//**
77  * @brief Return class name
78  *
79  * @return String containing the class name ("GWcsGLS").
80  ***************************************************************************/
81 inline
82 std::string GWcsGLS::classname(void) const
83 {
84  return ("GWcsGLS");
85 }
86 
87 
88 /***********************************************************************//**
89  * @brief Return projection code
90  *
91  * @return Projection code.
92  *
93  * Returns the projection code "GLS".
94  ***************************************************************************/
95 inline
96 std::string GWcsGLS::code(void) const
97 {
98  return "GLS";
99 }
100 
101 
102 /***********************************************************************//**
103  * @brief Return projection name
104  *
105  * @return Projection name.
106  *
107  * Returns the projection name.
108  ***************************************************************************/
109 inline
110 std::string GWcsGLS::name(void) const
111 {
112  return "Global Sinusoidal";
113 }
114 
115 #endif /* GWCSGLS_HPP */
virtual GWcsGLS * clone(void) const
Clone Global Sinusoidal projection.
Definition: GWcsGLS.cpp:202
GWcsGLS(void)
Void constructor.
Definition: GWcsGLS.cpp:62
Sanson-Flamsteed (SFL) projection class definition.
virtual std::string code(void) const
Return projection code.
Definition: GWcsGLS.hpp:96
GWcsGLS & operator=(const GWcsGLS &wcs)
Assignment operator.
Definition: GWcsGLS.cpp:143
void copy_members(const GWcsGLS &wcs)
Copy class members.
Definition: GWcsGLS.cpp:256
virtual std::string classname(void) const
Return class name.
Definition: GWcsGLS.hpp:82
Sanson-Flamsteed (SFL) projection class definition.
Definition: GWcsSFL.hpp:43
virtual std::string name(void) const
Return projection name.
Definition: GWcsGLS.hpp:110
virtual ~GWcsGLS(void)
Destructor.
Definition: GWcsGLS.cpp:121
GChatter
Definition: GTypemaps.hpp:33
virtual void clear(void)
Clear Global Sinusoidal projection.
Definition: GWcsGLS.cpp:178
Global Sinusoidal (GLS) projection class definition.
Definition: GWcsGLS.hpp:45
void init_members(void)
Initialise class members.
Definition: GWcsGLS.cpp:244
void free_members(void)
Delete class members.
Definition: GWcsGLS.cpp:266
virtual std::string print(const GChatter &chatter=NORMAL) const
Print Global Sinusoidal projection information.
Definition: GWcsGLS.cpp:214