All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::srs::SpatialReferenceSystem Class Referenceabstract

A Spatial Reference System, also known as a Coordinate System. More...

#include <SpatialReferenceSystem.h>

Inheritance diagram for te::srs::SpatialReferenceSystem:
te::srs::GeographicCoordinateSystem te::srs::ProjectedCoordinateSystem

Public Member Functions

const std::string & getName () const
 Returns the SRS name. More...
 
void getSRID (int &id, std::string &authName) const
 Returns SRS integer identification. More...
 
const std::string & getUnitName () const
 Returns the SRS unit name. More...
 
virtual std::string getWKT () const =0
 Returns an OGC's WKT representation for the SRS. More...
 
virtual bool isGeographic () const =0
 Returns true is a geographic coordinate system and false otherwise. More...
 
void setName (const std::string &name)
 Sets the SRS name. More...
 
void setSRID (int id, const std::string &authName="EPSG")
 Sets the SRS integer identification. More...
 
void setUnitName (const std::string &name)
 Sets the SRS unit name. More...
 
 SpatialReferenceSystem (const std::string &name="", const std::string &unitName="")
 Default constructor. More...
 
virtual ~SpatialReferenceSystem ()
 Virtual destructor. More...
 

Protected Attributes

std::string m_name
 
std::pair< unsigned int,
std::string > 
m_srid
 
std::string m_unitName
 

Detailed Description

A Spatial Reference System, also known as a Coordinate System.

A spatial reference system (SRS) or coordinate reference system (CRS) is a coordinate-based local, regional or global system used to locate geographical entities.

Definition at line 49 of file SpatialReferenceSystem.h.

Constructor & Destructor Documentation

te::srs::SpatialReferenceSystem::SpatialReferenceSystem ( const std::string &  name = "",
const std::string &  unitName = "" 
)

Default constructor.

Parameters
nameThe SRS name. Default empty string.
unitNameThe SRS unit name. Default empty string;

Definition at line 27 of file SpatialReferenceSystem.cpp.

te::srs::SpatialReferenceSystem::~SpatialReferenceSystem ( )
virtual

Virtual destructor.

Definition at line 34 of file SpatialReferenceSystem.cpp.

Member Function Documentation

const std::string & te::srs::SpatialReferenceSystem::getName ( ) const

Returns the SRS name.

Definition at line 43 of file SpatialReferenceSystem.cpp.

void te::srs::SpatialReferenceSystem::getSRID ( int &  id,
std::string &  authName 
) const

Returns SRS integer identification.

Parameters
idTo return the unique id (output);
authNameTo return the authority responsible for the id (output).

Definition at line 58 of file SpatialReferenceSystem.cpp.

const std::string & te::srs::SpatialReferenceSystem::getUnitName ( ) const

Returns the SRS unit name.

Definition at line 53 of file SpatialReferenceSystem.cpp.

virtual std::string te::srs::SpatialReferenceSystem::getWKT ( ) const
pure virtual

Returns an OGC's WKT representation for the SRS.

The WKT definition based on document "OpenGIS Implementation Specification: Coordinate Transformation Services Revision 1.00 - pages 18 and 19.

Implemented in te::srs::ProjectedCoordinateSystem, and te::srs::GeographicCoordinateSystem.

virtual bool te::srs::SpatialReferenceSystem::isGeographic ( ) const
pure virtual

Returns true is a geographic coordinate system and false otherwise.

Implemented in te::srs::ProjectedCoordinateSystem, and te::srs::GeographicCoordinateSystem.

void te::srs::SpatialReferenceSystem::setName ( const std::string &  name)

Sets the SRS name.

Parameters
namethe SRS name.

Definition at line 38 of file SpatialReferenceSystem.cpp.

void te::srs::SpatialReferenceSystem::setSRID ( int  id,
const std::string &  authName = "EPSG" 
)

Sets the SRS integer identification.

Spatial reference systems can be referred to using a SRID integer, given by an authority, such as the EPSG codes defined by the International Association of Oil and Gas Producers.

Parameters
idThe SRS integer identifier.
authNameThe authority responsible for the identifier. Default "EPSG".

Definition at line 64 of file SpatialReferenceSystem.cpp.

void te::srs::SpatialReferenceSystem::setUnitName ( const std::string &  name)

Sets the SRS unit name.

Parameters
namethe SRS unit name.

Definition at line 48 of file SpatialReferenceSystem.cpp.

Member Data Documentation

std::string te::srs::SpatialReferenceSystem::m_name
protected

Definition at line 112 of file SpatialReferenceSystem.h.

std::pair<unsigned int,std::string> te::srs::SpatialReferenceSystem::m_srid
protected

Definition at line 115 of file SpatialReferenceSystem.h.

std::string te::srs::SpatialReferenceSystem::m_unitName
protected

Definition at line 113 of file SpatialReferenceSystem.h.


The documentation for this class was generated from the following files: