GammaLib 2.0.0
Loading...
Searching...
No Matches
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 ***************************************************************************/
45class GWcsGLS : public GWcsSFL {
46
47public:
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
68protected:
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 ***************************************************************************/
81inline
82std::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 ***************************************************************************/
95inline
96std::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 ***************************************************************************/
109inline
110std::string GWcsGLS::name(void) const
111{
112 return "Global Sinusoidal";
113}
114
115#endif /* GWCSGLS_HPP */
GChatter
Definition GTypemaps.hpp:33
@ NORMAL
Definition GTypemaps.hpp:36
Sanson-Flamsteed (SFL) projection class definition.
Global Sinusoidal (GLS) projection class definition.
Definition GWcsGLS.hpp:45
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
void free_members(void)
Delete class members.
Definition GWcsGLS.cpp:266
GWcsGLS(void)
Void constructor.
Definition GWcsGLS.cpp:62
virtual void clear(void)
Clear Global Sinusoidal projection.
Definition GWcsGLS.cpp:178
virtual std::string print(const GChatter &chatter=NORMAL) const
Print Global Sinusoidal projection information.
Definition GWcsGLS.cpp:214
virtual std::string name(void) const
Return projection name.
Definition GWcsGLS.hpp:110
virtual GWcsGLS * clone(void) const
Clone Global Sinusoidal projection.
Definition GWcsGLS.cpp:202
virtual std::string code(void) const
Return projection code.
Definition GWcsGLS.hpp:96
void init_members(void)
Initialise class members.
Definition GWcsGLS.cpp:244
GWcsGLS & operator=(const GWcsGLS &wcs)
Assignment operator.
Definition GWcsGLS.cpp:143
virtual ~GWcsGLS(void)
Destructor.
Definition GWcsGLS.cpp:121
Sanson-Flamsteed (SFL) projection class definition.
Definition GWcsSFL.hpp:43