OTB
9.0.0
Orfeo Toolbox
|
#include <otbGeographicalDistance.h>
Public Types | |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef itk::SmartPointer< Self > | Pointer |
typedef GeographicalDistance | Self |
typedef itk::Statistics::DistanceMetric< TVector > | Superclass |
typedef TVector | VectorType |
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) |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
GeographicalDistance () | |
void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
~GeographicalDistance () override | |
Private Member Functions | |
GeographicalDistance (const Self &)=delete | |
void | operator= (const Self &)=delete |
Private Attributes | |
double | m_EarthRadius |
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.
typedef itk::SmartPointer<const Self> otb::GeographicalDistance< TVector >::ConstPointer |
Definition at line 58 of file otbGeographicalDistance.h.
typedef itk::SmartPointer<Self> otb::GeographicalDistance< TVector >::Pointer |
Definition at line 57 of file otbGeographicalDistance.h.
typedef GeographicalDistance otb::GeographicalDistance< TVector >::Self |
Standard class typedefs.
Definition at line 55 of file otbGeographicalDistance.h.
typedef itk::Statistics::DistanceMetric<TVector> otb::GeographicalDistance< TVector >::Superclass |
Definition at line 56 of file otbGeographicalDistance.h.
typedef TVector otb::GeographicalDistance< TVector >::VectorType |
Useful typedefs
Definition at line 64 of file otbGeographicalDistance.h.
|
protected |
Constructor
Definition at line 31 of file otbGeographicalDistance.hxx.
|
inlineoverrideprotected |
Destructor
Definition at line 87 of file otbGeographicalDistance.h.
|
privatedelete |
virtual::itk::LightObject::Pointer otb::GeographicalDistance< TVector >::CreateAnother | ( | void | ) | const |
|
override |
Gets the distance between the origin point and x. This function work with SetOrigin() function
Definition at line 37 of file otbGeographicalDistance.hxx.
|
override |
Definition at line 53 of file otbGeographicalDistance.hxx.
References otb::CONST_PI.
|
virtual |
Get the earth radius
|
virtual |
Run-time type information (and related methods).
|
static |
Method for creation through the object factory.
|
privatedelete |
|
overrideprotected |
PrintSelf method
Definition at line 78 of file otbGeographicalDistance.hxx.
|
virtual |
Set the earth radius
|
private |
Earth radius
Definition at line 99 of file otbGeographicalDistance.h.