OTB  6.7.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
otb::DEMHandler Class Reference

#include <otbDEMHandler.h>

+ Inheritance diagram for otb::DEMHandler:
+ Collaboration diagram for otb::DEMHandler:

Public Types

typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::Point< double, 2 > PointType
 
typedef DEMHandler Self
 
typedef itk::Object Superclass
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

void ClearDEMs ()
 
double GetDefaultHeightAboveEllipsoid () const
 
unsigned int GetDEMCount () const
 
std::string GetDEMDirectory (unsigned int idx=0) const
 
std::string GetGeoidFile () const
 
virtual const char * GetNameOfClass () const
 
virtual bool IsValidDEMDirectory (const char *DEMDirectory)
 
virtual bool OpenGeoidFile (const char *geoidFile)
 
virtual bool OpenGeoidFile (const std::string &geoidFile)
 
virtual void SetDefaultHeightAboveEllipsoid (double h)
 
virtual void OpenDEMDirectory (const char *DEMDirectory)
 
virtual void OpenDEMDirectory (const std::string &DEMDirectory)
 
virtual double GetHeightAboveMSL (double lon, double lat) const
 
virtual double GetHeightAboveMSL (const PointType &geoPoint) const
 
virtual double GetHeightAboveEllipsoid (double lon, double lat) const
 
virtual double GetHeightAboveEllipsoid (const PointType &geoPoint) const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual LightObject::Pointer CreateAnother () const override
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
virtual ModifiedTimeType GetMTime () const
 
virtual const std::string & GetObjectName () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
virtual void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual void SetReferenceCount (int) override
 
virtual void UnRegister () const noexceptoverride
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer Instance ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Protected Member Functions

 DEMHandler ()
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
 ~DEMHandler () override
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~Object ()
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Protected Attributes

double m_DefaultHeightAboveEllipsoid
 
std::string m_GeoidFile
 
- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

Static Protected Attributes

static Pointer m_Singleton
 

Detailed Description

Single access point for DEM data retrieval.

This class is the single configuration and access point for elevation handling in images projections and localization functions. Since this class is a singleton, there is no New() method. The DEMHandler::Instance() method should be used instead.

Please be aware that a proper instantiation and parameter setting of this class is advised before any call to geometric filters or functionalities. Ossim internal accesses to elevation are also configured by this class and this will ensure consistency throughout the library.

The class allows configuring a directory containing DEM tiles (DTED or SRTM supported) using the OpenDEMDirectory() method. The OpenGeoidFile() method allows inputting a geoid file as well. Last, a default height above ellipsoid can be set using the SetDefaultHeightAboveEllipsoid() method.

The class allows retrieving either height above ellipsoid or height above Mean Sea Level (MSL).

Here is the complete description of both methods output depending on the class configuration for the SRTM DEM (in the following, no SRTM means DEMDirectory not set, or no coverage for point, or srtm_value is no_data).

GetHeightAboveEllipsoid():

GetHeightAboveMSL():

Please note that OSSIM internal calls for sensor modeling use the height above ellipsoid, and follow the same logic as the GetHeightAboveEllipsoid() method.

DEM directory can either contain DTED or SRTM formats.

Definition at line 90 of file otbDEMHandler.h.

Member Typedef Documentation

Definition at line 97 of file otbDEMHandler.h.

Definition at line 96 of file otbDEMHandler.h.

Definition at line 99 of file otbDEMHandler.h.

Standard class typedefs.

Definition at line 94 of file otbDEMHandler.h.

Definition at line 95 of file otbDEMHandler.h.

Constructor & Destructor Documentation

otb::DEMHandler::DEMHandler ( )
protected
otb::DEMHandler::~DEMHandler ( )
inlineoverrideprotected

Definition at line 175 of file otbDEMHandler.h.

Member Function Documentation

void otb::DEMHandler::ClearDEMs ( )

Remove all the ossimElevationDatabases from the ossimElevManager.

double otb::DEMHandler::GetDefaultHeightAboveEllipsoid ( ) const

Set the default height above ellipsoid in case no information is available

unsigned int otb::DEMHandler::GetDEMCount ( ) const
Returns
The number of elevation databases in the ossimElevManager.
std::string otb::DEMHandler::GetDEMDirectory ( unsigned int  idx = 0) const

Get DEM directory

std::string otb::DEMHandler::GetGeoidFile ( ) const

Get Goid file

virtual double otb::DEMHandler::GetHeightAboveEllipsoid ( double  lon,
double  lat 
) const
virtual

Compute the height above ellipsoid of a geographic point.

virtual double otb::DEMHandler::GetHeightAboveEllipsoid ( const PointType geoPoint) const
virtual

Compute the height above ellipsoid of a geographic point.

virtual double otb::DEMHandler::GetHeightAboveMSL ( double  lon,
double  lat 
) const
virtual

Compute the height above MSL(Mean Sea Level) of a geographic point.

virtual double otb::DEMHandler::GetHeightAboveMSL ( const PointType geoPoint) const
virtual

Compute the height above MSL(Mean Sea Level) of a geographic point.

virtual const char* otb::DEMHandler::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::Object.

static Pointer otb::DEMHandler::Instance ( )
static
virtual bool otb::DEMHandler::IsValidDEMDirectory ( const char *  DEMDirectory)
virtual

return true if the directory contain DEM

virtual void otb::DEMHandler::OpenDEMDirectory ( const char *  DEMDirectory)
virtual

Try to open the DEM directory.

virtual void otb::DEMHandler::OpenDEMDirectory ( const std::string &  DEMDirectory)
virtual

Try to open the DEM directory.

virtual bool otb::DEMHandler::OpenGeoidFile ( const char *  geoidFile)
virtual

Open geoid file given its filename or throw an exception if geoid-file could not be loaded.

Parameters
geoidFileThe filename of the geoid-file.
Returns
true if geoid file has been changed or false if geod-file have been set before and could not be changed.
virtual bool otb::DEMHandler::OpenGeoidFile ( const std::string &  geoidFile)
virtual

Open geoid file given its filename or throw an exception if geoid-file could not be loaded.

Parameters
geoidFileThe filename of the geoid-file.
Returns
true if geoid file has been changed or false if geod-file have been set before and could not be changed.
void otb::DEMHandler::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotectedvirtual

Reimplemented from itk::Object.

virtual void otb::DEMHandler::SetDefaultHeightAboveEllipsoid ( double  h)
virtual

Set the default height above ellipsoid in case no information is available

Member Data Documentation

double otb::DEMHandler::m_DefaultHeightAboveEllipsoid
protected

Definition at line 185 of file otbDEMHandler.h.

std::string otb::DEMHandler::m_GeoidFile
protected

Definition at line 181 of file otbDEMHandler.h.

Pointer otb::DEMHandler::m_Singleton
staticprotected

Definition at line 187 of file otbDEMHandler.h.


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