All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SpatialReferenceSystem.cpp
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 SpatialReferenceSystem.cpp
22  */
23 
24 // TerraLib
25 #include "SpatialReferenceSystem.h"
26 
27 te::srs::SpatialReferenceSystem::SpatialReferenceSystem(const std::string& name, const std::string& unitName) :
28  m_name(name),
29  m_unitName(unitName),
30  m_srid(std::pair<unsigned int,std::string>(0,""))
31 {
32 }
33 
35 {
36 }
37 
38 void te::srs::SpatialReferenceSystem::setName(const std::string& name)
39 {
40  m_name = name;
41 }
42 
43 const std::string& te::srs::SpatialReferenceSystem::getName() const
44 {
45  return m_name;
46 }
47 
48 void te::srs::SpatialReferenceSystem::setUnitName(const std::string& unitName)
49 {
50  m_unitName = unitName;
51 }
52 
54 {
55  return m_unitName;
56 }
57 
58 void te::srs::SpatialReferenceSystem::getSRID(int& id, std::string& authName) const
59 {
60  id = m_srid.first;
61  authName = m_srid.second;
62 }
63 
64 void te::srs::SpatialReferenceSystem::setSRID(int id, const std::string& authName)
65 {
66  m_srid.first = id;
67  m_srid.second = authName;
68 }
69 
void setUnitName(const std::string &name)
Sets the SRS unit name.
void setName(const std::string &name)
Sets the SRS name.
const std::string & getUnitName() const
Returns the SRS unit name.
This file contains the structs necessary to represent a Spatial Reference System. ...
virtual ~SpatialReferenceSystem()
Virtual destructor.
void setSRID(int id, const std::string &authName="EPSG")
Sets the SRS integer identification.
SpatialReferenceSystem(const std::string &name="", const std::string &unitName="")
Default constructor.
const std::string & getName() const
Returns the SRS name.
void getSRID(int &id, std::string &authName) const
Returns SRS integer identification.