25 #include "../common/Exception.h" 26 #include "../core/translator/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)
84 const std::map<std::string, double>&
93 std::ostringstream sstr;
96 std::string wkt =
"PROJCS[\"";
103 wkt +=
",PROJECTION[\"";
108 std::map<std::string, double>::const_iterator it =
m_params.begin();
110 std::ostringstream sstr;
112 wkt +=
",PARAMETER[\"";
125 wkt += unit->getWKT();
129 wkt +=
",AUTHORITY[\"";
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.
std::pair< unsigned int, std::string > m_srid
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.
GeographicCoordinateSystem * m_geogcs
static UnitsOfMeasureManager & getInstance()
It returns a reference to the singleton instance.
~ProjectedCoordinateSystem()
Destructor.
std::string getWKT() const
Returns an OGC's WKT representation for the SRS.
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.
std::map< std::string, double > m_params