GeographicCoordinateSystem.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 GeographicCoordinateSystem.h
22 
23  \brief This file contains the structs necessary to represent a GeographicCoordinateSystem.
24  */
25 
26 #ifndef __TERRALIB_SRS_INTERNAL_GEOGRAPHICCOORDINATESYSTEM_H
27 #define __TERRALIB_SRS_INTERNAL_GEOGRAPHICCOORDINATESYSTEM_H
28 
29 // TerraLib
30 #include "Config.h"
31 #include "SpatialReferenceSystem.h"
32 
33 // STL
34 #include <string>
35 
36 namespace te
37 {
38  namespace srs
39  {
40  class Datum;
41 
42  /*!
43  \class GeographicCoordinateSystem
44 
45  \brief A Geographic Coordinate System (GEOGCS).
46 
47  A Geographic Coordinate System is a coordinate system based on latitude and longitude.
48 
49  \ingroup srs
50  */
52  {
53  public:
54 
55  /*!
56  \brief Constructor with parameters.
57  \param name The geographic coordinate system name.
58  \param unitName The name of the angular unit for this GEOGCS.
59  \param primem The meridian used to take longitude measurements from.
60  */
61  GeographicCoordinateSystem(const std::string& name="", const std::string unitName="degree", double primem=0.0);
62 
63  //! Destructor
65 
66  /*!
67  \brief Sets the associated Datum.
68  \param datum Pointer to GEOGCS datum. Do not pass null. Class takes the pointer ownership.
69  */
70  void setDatum(Datum* datum);
71 
72  /*!
73  \brief Returns the associated Datum.
74  \return A pointer to the GEOGCS datum. Class maintains the pointer ownership.
75  */
76  const Datum* getDatum() const;
77 
78  //! Returns the meridian used to take longitude measurements from.
79  double getPrimem() const;
80 
81  /*!
82  \brief Sets the meridian used to take longitude measurements from.
83  \param primen The meridian used to take longitude measurements from.
84  */
85  void setPrimem(double primen);
86 
87  std::string getWKT() const;
88 
89  bool isGeographic() const;
90 
91  private:
92 
93  Datum* m_datum; //!< Datum.
94  double m_primem; //!< The meridian used to take longitude measurements from.
95  };
96  }
97 }
98 #endif //__TERRALIB_SRS_INTERNAL_GEOGRAPHICCOORDINATESYSTEM_H
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::srs::GeographicCoordinateSystem::m_datum
Datum * m_datum
Datum.
Definition: GeographicCoordinateSystem.h:93
te::srs::Datum
A geodetic datum defines a reference to measure Earth's surface.
Definition: Datum.h:36
te::srs::GeographicCoordinateSystem::getPrimem
double getPrimem() const
Returns the meridian used to take longitude measurements from.
te::srs::GeographicCoordinateSystem
A Geographic Coordinate System (GEOGCS).
Definition: GeographicCoordinateSystem.h:52
te::srs::GeographicCoordinateSystem::isGeographic
bool isGeographic() const
Returns true is a geographic coordinate system and false otherwise.
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::GeographicCoordinateSystem::m_primem
double m_primem
The meridian used to take longitude measurements from.
Definition: GeographicCoordinateSystem.h:94
te::srs::GeographicCoordinateSystem::getWKT
std::string getWKT() const
Returns an OGC's WKT representation for the SRS.
te::srs::GeographicCoordinateSystem::~GeographicCoordinateSystem
~GeographicCoordinateSystem()
Destructor.
te::srs::GeographicCoordinateSystem::getDatum
const Datum * getDatum() const
Returns the associated Datum.
SpatialReferenceSystem.h
This file contains the structs necessary to represent a Spatial Reference System.
te::srs::SpatialReferenceSystem
A Spatial Reference System, also known as a Coordinate System.
Definition: SpatialReferenceSystem.h:50
te::srs::GeographicCoordinateSystem::setDatum
void setDatum(Datum *datum)
Sets the associated Datum.
te::srs::GeographicCoordinateSystem::setPrimem
void setPrimem(double primen)
Sets the meridian used to take longitude measurements from.
te::srs::GeographicCoordinateSystem::GeographicCoordinateSystem
GeographicCoordinateSystem(const std::string &name="", const std::string unitName="degree", double primem=0.0)
Constructor with parameters.
Config.h
Proxy configuration file for TerraView (see terraview_config.h).