Loading...
Searching...
No Matches
Ellipsoid.h
Go to the documentation of this file.
1/* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2
3 This file is part of the TerraLib - a Framework for building GIS enabled applications.
4
5 TerraLib is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 TerraLib is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with TerraLib. See COPYING. If not, write to
17 TerraLib Team at <terralib-team@terralib.org>.
18 */
19
20/*!
21 \file Ellipsoid.h
22
23 \brief This file contains the structs necessary to model an Ellipsoid.
24 */
25
26#ifndef __TERRALIB_SRS_INTERNAL_ELLIPSOID_H
27#define __TERRALIB_SRS_INTERNAL_ELLIPSOID_H
28
29// TerraLib
30#include "Config.h"
31
32// STL
33#include <string>
34
35namespace te
36{
37 namespace srs
38 {
39 /*!
40 \class Ellipsoid
41
42 \brief A reference ellipsoid is an approximation of the Earth's surface as a squashed sphere.
43
44 \note The terms "spheroid" and "ellipsoid" are synonymous.
45
46 \ingroup srs
47
48 \todo Verify if it is necessary to keep an <Id,Authority> to this object.
49 */
51 {
52
53 public:
54
55 //! Constructor with parameters
56 /*!
57 \param name Ellipsoid name (default empty string).
58 \param rad Semi-major axis (default 0.0);
59 \param invflat Inverse flattening (default 0.0).
60 */
61 Ellipsoid(const std::string& name = "", double rad = 0.0, double invflat = 0.0);
62
63 //! Returns the Ellipsoid name.
64 const std::string& getName() const;
65
66 /*!
67 \brief Sets the Ellipsoid name.
68 \param name Ellipsoid name.
69 */
70 void setName(const std::string& name);
71
72 //! Returns the Ellipsoid radium.
73 double getRadium() const;
74
75 /*!
76 \brief Sets the Ellipsoid radium.
77 \param rad Ellipsoid radium.
78 */
79 void setRadium(const double& rad);
80
81 //! Returns the Ellipsoid inverse flattening.
82 double getInverseFlattening() const;
83
84 /*!
85 \brief Sets the Ellipsoid inverse flattening.
86 \param invflat Ellipsoid inverse flattening.
87 */
88 void setInverseFlattening(const double& invflat);
89
90 //! Returns a WKT string that represents the ellipsoid.
91 std::string getWKT() const;
92
93 private:
94
95 std::string m_name; //!< Ellipsoid name
96 double m_radium; //!< Earth equatorial radius (Meters)
97 double m_invFlattening; //!< Earth flattening
98 };
99 }
100}
101#endif // __TERRALIB_SRS_INTERNAL_ELLIPSOID_H
A reference ellipsoid is an approximation of the Earth's surface as a squashed sphere.
Definition: Ellipsoid.h:51
Ellipsoid(const std::string &name="", double rad=0.0, double invflat=0.0)
Constructor with parameters.
double m_invFlattening
Earth flattening.
Definition: Ellipsoid.h:97
double m_radium
Earth equatorial radius (Meters)
Definition: Ellipsoid.h:96
void setName(const std::string &name)
Sets the Ellipsoid name.
double getInverseFlattening() const
Returns the Ellipsoid inverse flattening.
std::string m_name
Ellipsoid name.
Definition: Ellipsoid.h:95
std::string getWKT() const
Returns a WKT string that represents the ellipsoid.
const std::string & getName() const
Returns the Ellipsoid name.
double getRadium() const
Returns the Ellipsoid radium.
void setRadium(const double &rad)
Sets the Ellipsoid radium.
void setInverseFlattening(const double &invflat)
Sets the Ellipsoid inverse flattening.
TerraLib.
#define TESRSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:377
Proxy configuration file for TerraView (see terraview_config.h).