OTB  6.7.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
otb::GeographicalDistance< TVector > Class Template Reference

#include <otbGeographicalDistance.h>

+ Inheritance diagram for otb::GeographicalDistance< TVector >:
+ Collaboration diagram for otb::GeographicalDistance< TVector >:

Public Types

typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef itk::SmartPointer< SelfPointer
 
typedef GeographicalDistance Self
 
typedef
itk::Statistics::DistanceMetric
< TVector > 
Superclass
 
typedef TVector VectorType
 
- Public Types inherited from itk::Statistics::DistanceMetric< TVector >
typedef SmartPointer< const SelfConstPointer
 
typedef unsigned int MeasurementVectorSizeType
 
typedef TVector MeasurementVectorType
 
typedef Array< double > OriginType
 
typedef SmartPointer< SelfPointer
 
typedef DistanceMetric Self
 
typedef FunctionBase< TVector,
double > 
Superclass
 
- Public Types inherited from itk::FunctionBase< TVector, double >
typedef SmartPointer< const SelfConstPointer
 
typedef TVector InputType
 
typedef double OutputType
 
typedef SmartPointer< SelfPointer
 
typedef FunctionBase Self
 
typedef 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

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
double Evaluate (const VectorType &x) const override
 
double Evaluate (const VectorType &x, const VectorType &y) const override
 
virtual double GetEarthRadius ()
 
virtual const char * GetNameOfClass () const
 
virtual void SetEarthRadius (double _arg)
 
- Public Member Functions inherited from itk::Statistics::DistanceMetric< TVector >
virtual MeasurementVectorSizeType GetMeasurementVectorSize () const
 
virtual const OriginTypeGetOrigin () const
 
virtual void SetMeasurementVectorSize (MeasurementVectorSizeType s)
 
void SetOrigin (const OriginType &x)
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
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 New ()
 
- 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

 GeographicalDistance ()
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
 ~GeographicalDistance () override
 
- Protected Member Functions inherited from itk::Statistics::DistanceMetric< TVector >
 DistanceMetric ()
 
virtual ~DistanceMetric ()
 
- Protected Member Functions inherited from itk::FunctionBase< TVector, double >
 FunctionBase ()
 
 ~FunctionBase ()
 
- 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 ()
 

Private Member Functions

 GeographicalDistance (const Self &)=delete
 
void operator= (const Self &)=delete
 

Private Attributes

double m_EarthRadius
 

Additional Inherited Members

- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

Detailed Description

template<class TVector>
class otb::GeographicalDistance< TVector >

Compute the metric distance between two geographical points.

Vector length must be at least two, otherwise the Evaluate method will throw an exception.

First dimension is assumed to be the longitude, and second dimension is assumed to be the latitude.

This distance uses the Haversine formula, which can be found here: http://www.movable-type.co.uk/scripts/latlong.html

Please note that the computation makes use of the earth radius in meters. Mean radius (6371 km) is used as a default value, but one might use local values from spheroid or geoid for better precision.

Definition at line 50 of file otbGeographicalDistance.h.

Member Typedef Documentation

template<class TVector >
typedef itk::SmartPointer<const Self> otb::GeographicalDistance< TVector >::ConstPointer

Definition at line 59 of file otbGeographicalDistance.h.

template<class TVector >
typedef itk::SmartPointer<Self> otb::GeographicalDistance< TVector >::Pointer

Definition at line 58 of file otbGeographicalDistance.h.

template<class TVector >
typedef GeographicalDistance otb::GeographicalDistance< TVector >::Self

Standard class typedefs.

Definition at line 56 of file otbGeographicalDistance.h.

template<class TVector >
typedef itk::Statistics::DistanceMetric<TVector> otb::GeographicalDistance< TVector >::Superclass

Definition at line 57 of file otbGeographicalDistance.h.

template<class TVector >
typedef TVector otb::GeographicalDistance< TVector >::VectorType

Useful typedefs

Definition at line 65 of file otbGeographicalDistance.h.

Constructor & Destructor Documentation

template<class TVector >
otb::GeographicalDistance< TVector >::GeographicalDistance ( )
protected

Constructor

Definition at line 32 of file otbGeographicalDistance.hxx.

template<class TVector >
otb::GeographicalDistance< TVector >::~GeographicalDistance ( )
inlineoverrideprotected

Destructor

Definition at line 88 of file otbGeographicalDistance.h.

template<class TVector >
otb::GeographicalDistance< TVector >::GeographicalDistance ( const Self )
privatedelete

Member Function Documentation

template<class TVector >
virtual::itk::LightObject::Pointer otb::GeographicalDistance< TVector >::CreateAnother ( void  ) const
virtual

Reimplemented from itk::Object.

template<class TVector >
double otb::GeographicalDistance< TVector >::Evaluate ( const VectorType x) const
overridevirtual

Gets the distance between the origin point and x. This function work with SetOrigin() function

Implements itk::Statistics::DistanceMetric< TVector >.

Definition at line 39 of file otbGeographicalDistance.hxx.

template<class TVector >
double otb::GeographicalDistance< TVector >::Evaluate ( const VectorType x,
const VectorType y 
) const
overridevirtual

Implements itk::Statistics::DistanceMetric< TVector >.

Definition at line 57 of file otbGeographicalDistance.hxx.

References otb::CONST_PI.

template<class TVector >
virtual double otb::GeographicalDistance< TVector >::GetEarthRadius ( )
virtual

Get the earth radius

template<class TVector >
virtual const char* otb::GeographicalDistance< TVector >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::Statistics::DistanceMetric< TVector >.

template<class TVector >
static Pointer otb::GeographicalDistance< TVector >::New ( )
static

Method for creation through the object factory.

template<class TVector >
void otb::GeographicalDistance< TVector >::operator= ( const Self )
privatedelete
template<class TVector >
void otb::GeographicalDistance< TVector >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotectedvirtual

PrintSelf method

Reimplemented from itk::Statistics::DistanceMetric< TVector >.

Definition at line 85 of file otbGeographicalDistance.hxx.

template<class TVector >
virtual void otb::GeographicalDistance< TVector >::SetEarthRadius ( double  _arg)
virtual

Set the earth radius

Member Data Documentation

template<class TVector >
double otb::GeographicalDistance< TVector >::m_EarthRadius
private

Earth radius

Definition at line 98 of file otbGeographicalDistance.h.


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