25 #include "../common/Exception.h"
26 #include "../common/Translator.h"
27 #include "../common/UnitOfMeasure.h"
28 #include "../common/UnitsOfMeasureManager.h"
38 const std::string& unitName,
40 const std::string& projName):
43 m_projection(projName)
69 m_projection = projname;
84 const std::map<std::string, double>&
93 std::ostringstream sstr;
96 std::string wkt =
"PROJCS[\"";
101 wkt += m_geogcs->getWKT();
103 wkt +=
",PROJECTION[\"";
106 if (!m_params.empty())
108 std::map<std::string, double>::const_iterator it = m_params.begin();
110 std::ostringstream sstr;
112 wkt +=
",PARAMETER[\"";
119 }
while (it != m_params.end());
125 wkt += unit->getWKT();
127 if (m_srid.first > 0 && !m_srid.second.empty())
129 wkt +=
",AUTHORITY[\"";
130 wkt += m_srid.second;
133 sstr << m_srid.first;
void setProjection(const std::string &projname)
Sets the map projection name.
A Geographic Coordinate System (GEOGCS).
const GeographicCoordinateSystem * getGeographicCoordinateSystem() const
Returns the underlying Geographic Coordinate Reference System.
bool isGeographic() const
Returns true is a geographic coordinate system and false otherwise.
const std::map< std::string, double > & getParameters() const
Returns the list of projection parameters.
A Spatial Reference System, also known as a Coordinate System.
This file contains the structs necessary to represent a ProjectedCoordinateSystem.
static UnitsOfMeasureManager & getInstance()
It returns a reference to the singleton instance.
~ProjectedCoordinateSystem()
Destructor.
boost::shared_ptr< UnitOfMeasure > UnitOfMeasurePtr
const std::string & getProjection() const
Returns the map projection name.
This file contains the structs necessary to represent a GeographicCoordinateSystem.
ProjectedCoordinateSystem(const std::string &name="", const std::string &unitName="", GeographicCoordinateSystem *geogcs=0, const std::string &projName="")
Constructor with parameters.
void setParameters(const std::map< std::string, double > ¶ms)
Sets the projection parameters.
std::string getWKT() const
Returns an OGC's WKT representation for the SRS.
UnitOfMeasurePtr find(unsigned int id) const
Returns a unit of measure identified by its identificaton.
void setGeographicCoordinateSystem(GeographicCoordinateSystem *geogcs)
Sets the underlying Geographic Coordinate Reference System.