OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
Class for creating datum instances from EPSG codes. More...
#include <ossimEpsgDatumFactory.h>
Public Member Functions | |
virtual | ~ossimEpsgDatumFactory () |
Destructor. More... | |
virtual const ossimDatum * | create (const ossimString &epsg_spec) const |
Creates a datum instance given an EPSG spec in the form "EPSG:<datum_code>". More... | |
virtual const ossimDatum * | create (const ossimKeywordlist &kwl, const char *prefix=0) const |
Creates a datum instance given a KWL and prefix. More... | |
virtual void | getList (std::vector< ossimString > &list) const |
Returns list of all datums supported, in the form of "EPSG:<code>, <datum_name>". More... | |
const ossimDatum * | create (ossim_uint32 epsg_code) const |
Specific to this factory only. Creates a datum instance given an EPSG integer code. More... | |
ossim_uint32 | findEpsgCode (const ossimString &alpha_code) const |
Specific to this factory only. More... | |
ossimString | findAlphaCode (ossim_uint32 epsg_code) const |
Specific to this factory only. More... | |
![]() | |
ossimDatumFactoryInterface () | |
default constructor More... | |
virtual | ~ossimDatumFactoryInterface () |
virtual destructor More... | |
Static Public Member Functions | |
static ossimEpsgDatumFactory * | instance () |
Singleton implementation. More... | |
Protected Member Functions | |
ossimEpsgDatumFactory () | |
Hidden constructors for singleton implementation. More... | |
Protected Attributes | |
std::map< ossim_uint32, std::string > | m_epsgToAlphaMap |
Presently implemented as a mapping from EPSG code to OSSIM/Geotrans alpha-codes found in ossimDatumFactory. More... | |
Class for creating datum instances from EPSG codes.
Presently only a small subset of EPSG datums are supported. These are hardcoded here or, alternatively, the EPSG code is mapped to the OSSIM/Geotrans code and ossimDatumFactory is used to produce the final datum.
TO DO: Eventually we should have a disk-file based database lookup of datums with associated parameters similar to the EPSG projection factory and database.
Definition at line 31 of file ossimEpsgDatumFactory.h.
|
virtual |
|
protected |
Hidden constructors for singleton implementation.
Definition at line 47 of file ossimEpsgDatumFactory.cpp.
References m_epsgToAlphaMap.
|
virtual |
Creates a datum instance given an EPSG spec in the form "EPSG:<datum_code>".
Creates given an EPSG spec in the form "EPSG:<datum_code>".
Implements ossimDatumFactoryInterface.
Definition at line 129 of file ossimEpsgDatumFactory.cpp.
References ossimString::after(), ossimString::before(), ossimString::contains(), ossimString::size(), and ossimString::toUInt32().
Referenced by create(), ossimEpsgProjectionDatabase::createProjFromFormatARecord(), and ossimWktProjectionFactory::doMapCommon().
|
virtual |
Creates a datum instance given a KWL and prefix.
Implements ossimDatumFactoryInterface.
Definition at line 157 of file ossimEpsgDatumFactory.cpp.
References create(), ossimString::empty(), ossimKeywordlist::find(), and ossimKeywordNames::GCS_CODE_KW.
const ossimDatum * ossimEpsgDatumFactory::create | ( | ossim_uint32 | epsg_code | ) | const |
Specific to this factory only. Creates a datum instance given an EPSG integer code.
Creates given an EPSG spec in the form "EPSG:<datum_code>".
Definition at line 168 of file ossimEpsgDatumFactory.cpp.
References ossimDatumFactory::create(), ossimString::empty(), findAlphaCode(), and ossimDatumFactory::instance().
ossimString ossimEpsgDatumFactory::findAlphaCode | ( | ossim_uint32 | epsg_code | ) | const |
Specific to this factory only.
Given an EPSG, returns equivalent alpha-code datum code or empty string if not found.
Definition at line 232 of file ossimEpsgDatumFactory.cpp.
References m_epsgToAlphaMap.
Referenced by create().
ossim_uint32 ossimEpsgDatumFactory::findEpsgCode | ( | const ossimString & | alpha_code | ) | const |
Specific to this factory only.
Given an alpha-code, returns equivalent EPSG datum code or 0 if not found.
Definition at line 216 of file ossimEpsgDatumFactory.cpp.
References m_epsgToAlphaMap, and ossimString::string().
Referenced by ossimDatum::ossimDatum().
|
virtual |
Returns list of all datums supported, in the form of "EPSG:<code>, <datum_name>".
Implements ossimDatumFactoryInterface.
Definition at line 187 of file ossimEpsgDatumFactory.cpp.
References ossimDatumFactory::create(), ossimDatumFactory::instance(), m_epsgToAlphaMap, ossimDatum::name(), ossimString::push_back(), and ossimString::toString().
|
static |
Singleton implementation.
Definition at line 31 of file ossimEpsgDatumFactory.cpp.
Referenced by ossimEpsgProjectionDatabase::createProjFromFormatARecord(), ossimWktProjectionFactory::doMapCommon(), ossimDatum::ossimDatum(), and ossimDatumFactoryRegistry::ossimDatumFactoryRegistry().
|
protected |
Presently implemented as a mapping from EPSG code to OSSIM/Geotrans alpha-codes found in ossimDatumFactory.
Eventually should be independent (and deprecate) ossimDatumFactory.
Definition at line 66 of file ossimEpsgDatumFactory.h.
Referenced by findAlphaCode(), findEpsgCode(), getList(), and ossimEpsgDatumFactory().