ProjectedCoordinateSystem.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 ProjectedCoordinateSystem.h
22 
23  \brief This file contains the structs necessary to represent a ProjectedCoordinateSystem.
24  */
25 
26 #ifndef __TERRALIB_SRS_INTERNAL_PROJECTEDCOORDINATESYSTEM_H
27 #define __TERRALIB_SRS_INTERNAL_PROJECTEDCOORDINATESYSTEM_H
28 
29 // TerraLib
30 #include "Config.h"
31 #include "SpatialReferenceSystem.h"
32 
33 // STL
34 #include <map>
35 #include <string>
36 
37 
38 namespace te
39 {
40  namespace srs
41  {
42  class GeographicCoordinateSystem;
43 
44  /*!
45 
46  \class ProjectedCoordinateSystem
47 
48  \brief A Projected Coordinate System (PROJCS).
49 
50  A coordinate reference system that is based on a geographic CRS and then uses a map projection to convert the coordinates to a plane.
51 
52  \ingroup srs
53  */
55  {
56 
57  public:
58 
59  /*!
60  \brief Constructor with parameters.
61  \param name Projected coordinate system name (default empty string).
62  \param unitName The name of the linear unit associated to the PROJCS (default empty string).
63  \param geogcs Pointer to the underlying geographic coordinate system (default null). Class takes pointer ownership.
64  \param projName The name of the map projection (default empty string).
65  */
66  ProjectedCoordinateSystem(const std::string& name = "",
67  const std::string& unitName = "",
69  const std::string& projName = "");
70 
71  //! Destructor.
73 
74  /*!
75  \brief Sets the underlying Geographic Coordinate Reference System.
76  \param geogcs A pointer to Geographic Coordinate Reference System. Do not pass null. Class takes pointer ownership.
77  */
78  void setGeographicCoordinateSystem(GeographicCoordinateSystem* geogcs);
79 
80  /*!
81  \brief Returns the underlying Geographic Coordinate Reference System.
82  \return A pointer to Geographic Coordinate Reference System. Class maintains pointer ownership.
83  */
84  const GeographicCoordinateSystem* getGeographicCoordinateSystem() const;
85 
86  /*!
87  \brief Sets the map projection name.
88  \param projname The map projection name.
89  */
90  void setProjection(const std::string& projname);
91 
92  //! Returns the map projection name.
93  const std::string& getProjection() const;
94 
95  /*!
96  \brief Sets the projection parameters.
97  \param params The projection parameters.
98  */
99  void setParameters(const std::map<std::string, double>& params);
100 
101  //! Returns the list of projection parameters.
102  const std::map<std::string, double>& getParameters() const;
103 
104  std::string getWKT() const;
105 
106  bool isGeographic() const;
107 
108  private:
109 
111  std::string m_projection;
112  std::map<std::string, double> m_params;
113  };
114  }
115 }
116 #endif // __TERRALIB_SRS_INTERNAL_PROJECTEDCOORDINATESYSTEM_H
A Geographic Coordinate System (GEOGCS).
A Spatial Reference System, also known as a Coordinate System.
This file contains the structs necessary to represent a Spatial Reference System. ...
URI C++ Library.
A Projected Coordinate System (PROJCS).
#define TESRSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:364
std::map< std::string, double > m_params