25 #include "../common/Exception.h"
26 #include "../common/Translator.h"
27 #include "../common/UnitOfMeasure.h"
28 #include "../common/UnitsOfMeasureManager.h"
37 const std::string unitName,
74 std::ostringstream sstr;
77 std::string wkt =
"GEOGCS[\"";
82 wkt += m_datum->getWKT();
98 wkt += unit->getWKT();
100 if (m_srid.first > 0 && !m_srid.second.empty())
102 wkt +=
",AUTHORITY[\"";
103 wkt += m_srid.second;
106 sstr << m_srid.first;
A geodetic datum defines a reference to measure Earth's surface.
GeographicCoordinateSystem(const std::string &name="", const std::string unitName="degree", double primem=0.0)
Constructor with parameters.
This file contains the support to represent a geodetic datum.
const Datum * getDatum() const
Returns the associated Datum.
~GeographicCoordinateSystem()
Destructor.
A Spatial Reference System, also known as a Coordinate System.
void setDatum(Datum *datum)
Sets the associated Datum.
static UnitsOfMeasureManager & getInstance()
It returns a reference to the singleton instance.
void setPrimem(double primen)
Sets the meridian used to take longitude measurements from.
double getPrimem() const
Returns the meridian used to take longitude measurements from.
std::string getWKT() const
Returns an OGC's WKT representation for the SRS.
boost::shared_ptr< UnitOfMeasure > UnitOfMeasurePtr
This file contains the structs necessary to represent a GeographicCoordinateSystem.
bool isGeographic() const
Returns true is a geographic coordinate system and false otherwise.
UnitOfMeasurePtr find(unsigned int id) const
Returns a unit of measure identified by its identificaton.