Datum.h
Go to the documentation of this file.
1 /*!
2  \file Datum.h
3 
4  \brief This file contains the support to represent a geodetic datum.
5  */
6 
7 #ifndef __TERRALIB_SRS_INTERNAL_DATUM_H
8 #define __TERRALIB_SRS_INTERNAL_DATUM_H
9 
10 // TerraLib
11 #include "Config.h"
12 
13 // STL
14 #include <string>
15 #include <vector>
16 
17 namespace te
18 {
19  namespace srs
20  {
21  class Ellipsoid;
22 
23  /*!
24  \class Datum.
25 
26  \brief A geodetic datum defines a reference to measure Earth's surface.
27 
28  Planimetric datum parameters are used for defining geodetic coordinates,
29  which are necessary to establish a map projection system.
30 
31  \ingroup srs
32 
33  \todo Verify if it is necessary to keep an <Id,Authority> information to this object.
34  */
36  {
37 
38  public:
39 
40  /*!
41  \brief Constructor with parameters.
42  \param name Datum name (default empty string)..
43  \param ellps Pointer to the Ellipsoid associated to the Datum. Default null. Class takes the pointer ownership.
44  */
45  Datum(const std::string& name="", Ellipsoid* ellps=0);
46 
47  //! Destructor.
48  ~Datum();
49 
50  //! Returns the Datum name.
51  const std::string& getName() const;
52 
53  /*!
54  \brief Sets the Datum name.
55  \param name The Datum name.
56  */
57  void setName(const std::string& name);
58 
59  //! Returns the Ellipsoid associated to the Datum.
60  const Ellipsoid* getEllipsoid() const;
61 
62  /*!
63  \brief Sets the Ellipsoid associated to the Datum.
64  \param ellps Pointer to the ellipsoid. Do not pass null. Class takes the pointer ownership.
65  */
66  void setEllipsoid(Ellipsoid* ellps);
67 
68  /*!
69  \brief Sets the Datum shifting parameters relative to WGS84.
70 
71  This indicates a list of up to 7 Bursa Wolf transformation parameters.
72  These parameters can be used to approximate a transformation from a given datum to the WGS84.
73  \param params A vector of shifting parameters.
74  */
75  void setToWGS84Params(const std::vector<double>& params);
76 
77  //! Returns the WGS84 shifting parameters.
78  const std::vector<double>& getToWGS84Params() const;
79 
80  //! Returns a WKT string that represent the Datum.
81  std::string getWKT() const;
82 
83  private:
84 
85  std::string m_name; //!< Datum name.
86  Ellipsoid* m_ellipsoid; //!< Reference ellipsoid.
87  std::vector<double> m_towgs84; //!< To store shifting parametes necessary to execute Datum shifting to a WGS84 Datum.
88  };
89  }
90 }
91 #endif //__TERRALIB_SRS_INTERNAL_DATUM_H
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::srs::Datum::~Datum
~Datum()
Destructor.
te::srs::Datum
A geodetic datum defines a reference to measure Earth's surface.
Definition: Datum.h:36
te::srs::Datum::setName
void setName(const std::string &name)
Sets the Datum name.
te::srs::Datum::getToWGS84Params
const std::vector< double > & getToWGS84Params() const
Returns the WGS84 shifting parameters.
te::srs::Ellipsoid
A reference ellipsoid is an approximation of the Earth's surface as a squashed sphere.
Definition: Ellipsoid.h:51
TESRSEXPORT
#define TESRSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:375
te::srs::Datum::getName
const std::string & getName() const
Returns the Datum name.
te::srs::Datum::m_name
std::string m_name
Datum name.
Definition: Datum.h:85
te::srs::Datum::Datum
Datum(const std::string &name="", Ellipsoid *ellps=0)
Constructor with parameters.
te::srs::Datum::m_ellipsoid
Ellipsoid * m_ellipsoid
Reference ellipsoid.
Definition: Datum.h:86
te::srs::Datum::getWKT
std::string getWKT() const
Returns a WKT string that represent the Datum.
te::srs::Datum::setEllipsoid
void setEllipsoid(Ellipsoid *ellps)
Sets the Ellipsoid associated to the Datum.
te::srs::Datum::getEllipsoid
const Ellipsoid * getEllipsoid() const
Returns the Ellipsoid associated to the Datum.
te::srs::Datum::m_towgs84
std::vector< double > m_towgs84
To store shifting parametes necessary to execute Datum shifting to a WGS84 Datum.
Definition: Datum.h:87
Config.h
Proxy configuration file for TerraView (see terraview_config.h).
te::srs::Datum::setToWGS84Params
void setToWGS84Params(const std::vector< double > &params)
Sets the Datum shifting parameters relative to WGS84.