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

◆ SpatialReferenceSystem()

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;

◆ ~SpatialReferenceSystem()

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

Virtual destructor.

Member Function Documentation

◆ getName()

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

Returns the SRS name.

◆ getSRID()

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).

◆ getUnitName()

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

Returns the SRS unit name.

◆ getWKT()

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.

◆ isGeographic()

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.

◆ setName()

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

Sets the SRS name.

Parameters
namethe SRS name.

◆ setSRID()

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".

◆ setUnitName()

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

Sets the SRS unit name.

Parameters
namethe SRS unit name.

Member Data Documentation

◆ m_name

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

Definition at line 112 of file SpatialReferenceSystem.h.

◆ m_srid

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

Definition at line 115 of file SpatialReferenceSystem.h.

◆ m_unitName

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 file: