OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Protected Attributes | Friends | List of all members
ossimEcefPoint Class Reference

#include <ossimEcefPoint.h>

Public Member Functions

 ossimEcefPoint ()
 
 ossimEcefPoint (const ossimGpt &convert_this)
 
 ossimEcefPoint (const double &x, const double &y, const double &z)
 
 ossimEcefPoint (const ossimColumnVector3d &assign_this)
 
 ossimEcefPoint (const NEWMAT::ColumnVector &assign_this)
 
 ossimEcefPoint (const ossimDpt3d &pt)
 
void makeNan ()
 
bool hasNans () const
 
bool isNan () const
 
ossimEcefVector operator- (const ossimEcefPoint &) const
 
ossimEcefPoint operator+ (const ossimEcefVector &) const
 
ossimEcefPoint operator- (const ossimEcefVector &) const
 
bool operator== (const ossimEcefPoint &) const
 
bool operator!= (const ossimEcefPoint &) const
 
double x () const
 
double & x ()
 
double y () const
 
double & y ()
 
double z () const
 
double & z ()
 
double & operator[] (int idx)
 
const double & operator[] (int idx) const
 
const ossimColumnVector3ddata () const
 
ossimColumnVector3ddata ()
 
double getMagnitude () const
 
double magnitude () const
 
double length () const
 
double normalize ()
 
ossimString toString (ossim_uint32 precision=15) const
 To string method. More...
 
void toPoint (const std::string &s)
 Initializes this point from string. More...
 
NEWMAT::ColumnVector toVector () const
 Converts this point to a 3D column vector. More...
 
void toPoint (const NEWMAT::ColumnVector &v)
 Converts 3D column vector to this point. More...
 
void print (std::ostream &os=ossimNotify(ossimNotifyLevel_INFO)) const
 

Protected Attributes

ossimColumnVector3d theData
 

Friends

OSSIM_DLL std::ostream & operator<< (std::ostream &os, const ossimEcefPoint &instance)
 

Detailed Description

Definition at line 35 of file ossimEcefPoint.h.

Constructor & Destructor Documentation

◆ ossimEcefPoint() [1/6]

ossimEcefPoint::ossimEcefPoint ( )
inline

CONSTRUCTORS:

Definition at line 41 of file ossimEcefPoint.h.

Referenced by operator+(), and operator-().

42  : theData(0,0,0) {}
ossimColumnVector3d theData

◆ ossimEcefPoint() [2/6]

ossimEcefPoint::ossimEcefPoint ( const ossimGpt convert_this)

Definition at line 32 of file ossimEcefPoint.cpp.

References ossimGpt::datum(), ossimDatum::ellipsoid(), ossimGpt::height(), ossimGpt::isHgtNan(), ossimGpt::latd(), ossimEllipsoid::latLonHeightToXYZ(), ossimGpt::lond(), and theData.

33 {
34  if(!gpt.isHgtNan())
35  {
36  gpt.datum()->ellipsoid()->latLonHeightToXYZ(gpt.latd(),
37  gpt.lond(),
38  gpt.height(),
39  theData[0],
40  theData[1],
41  theData[2]);
42  }
43  else
44  {
45  gpt.datum()->ellipsoid()->latLonHeightToXYZ(gpt.latd(),
46  gpt.lond(),
47  0.0,
48  theData[0],
49  theData[1],
50  theData[2]);
51  }
52 }
ossimColumnVector3d theData

◆ ossimEcefPoint() [3/6]

ossimEcefPoint::ossimEcefPoint ( const double &  x,
const double &  y,
const double &  z 
)
inline

Definition at line 49 of file ossimEcefPoint.h.

52  : theData(x, y, z) {}
double x() const
double y() const
double z() const
ossimColumnVector3d theData

◆ ossimEcefPoint() [4/6]

ossimEcefPoint::ossimEcefPoint ( const ossimColumnVector3d assign_this)
inline

Definition at line 54 of file ossimEcefPoint.h.

55  : theData(assign_this) {}
ossimColumnVector3d theData

◆ ossimEcefPoint() [5/6]

ossimEcefPoint::ossimEcefPoint ( const NEWMAT::ColumnVector &  assign_this)
inline

Definition at line 57 of file ossimEcefPoint.h.

58  : theData(assign_this) {}
ossimColumnVector3d theData

◆ ossimEcefPoint() [6/6]

ossimEcefPoint::ossimEcefPoint ( const ossimDpt3d pt)

Definition at line 54 of file ossimEcefPoint.cpp.

55  :theData(pt.x, pt.y, pt.z)
56 {
57 }
double z
Definition: ossimDpt3d.h:145
double x
Definition: ossimDpt3d.h:143
double y
Definition: ossimDpt3d.h:144
ossimColumnVector3d theData

Member Function Documentation

◆ data() [1/2]

const ossimColumnVector3d& ossimEcefPoint::data ( ) const
inline

◆ data() [2/2]

ossimColumnVector3d& ossimEcefPoint::data ( )
inline

Definition at line 106 of file ossimEcefPoint.h.

106 { return theData; }
ossimColumnVector3d theData

◆ getMagnitude()

double ossimEcefPoint::getMagnitude ( ) const
inline

Definition at line 108 of file ossimEcefPoint.h.

109  {
110  return theData.magnitude();
111  }
ossimColumnVector3d theData

◆ hasNans()

bool ossimEcefPoint::hasNans ( ) const
inline

Definition at line 69 of file ossimEcefPoint.h.

References ossim::isnan().

Referenced by ossimLsrPoint::initialize().

70  {
71  return ( ossim::isnan(theData[0]) ||
72  ossim::isnan(theData[1]) ||
73  ossim::isnan(theData[2]) );
74 
75  }
ossimColumnVector3d theData
bool isnan(const float &v)
isnan Test for floating point Not A Number (NAN) value.
Definition: ossimCommon.h:91

◆ isNan()

bool ossimEcefPoint::isNan ( ) const
inline

Definition at line 77 of file ossimEcefPoint.h.

References ossim::isnan().

Referenced by ossimGpt::ossimGpt(), and print().

78  {
79  return ( ossim::isnan(theData[0]) &&
80  ossim::isnan(theData[1]) &&
81  ossim::isnan(theData[2]) );
82 
83  }
ossimColumnVector3d theData
bool isnan(const float &v)
isnan Test for floating point Not A Number (NAN) value.
Definition: ossimCommon.h:91

◆ length()

double ossimEcefPoint::length ( ) const
inline

Definition at line 116 of file ossimEcefPoint.h.

117  {
118  return theData.magnitude();
119  }
ossimColumnVector3d theData

◆ magnitude()

double ossimEcefPoint::magnitude ( ) const
inline

Definition at line 112 of file ossimEcefPoint.h.

113  {
114  return theData.magnitude();
115  }
ossimColumnVector3d theData

◆ makeNan()

void ossimEcefPoint::makeNan ( )
inline

Definition at line 62 of file ossimEcefPoint.h.

References ossim::nan().

Referenced by ossimSpotDimapSupportData::getPositionEcf(), ossimFormosatDimapSupportData::getPositionEcf(), ossimSpotDimapSupportData::getVelocityEcf(), ossimFormosatDimapSupportData::getVelocityEcf(), and ossimEcefRay::intersectAboveEarthEllipsoid().

63  {
64  theData[0] = ossim::nan();
65  theData[1] = ossim::nan();
66  theData[2] = ossim::nan();
67  }
double nan()
Method to return ieee floating point double precision NAN.
Definition: ossimCommon.h:135
ossimColumnVector3d theData

◆ normalize()

double ossimEcefPoint::normalize ( )
inline

Definition at line 120 of file ossimEcefPoint.h.

121  {
122  double result = magnitude();
123 
124  if(result > 1e-15)
125  {
126  theData[0]/=result;
127  theData[1]/=result;
128  theData[2]/=result;
129  }
130 
131  return result;
132  }
double magnitude() const
ossimColumnVector3d theData

◆ operator!=()

bool ossimEcefPoint::operator!= ( const ossimEcefPoint p) const
inline

Definition at line 205 of file ossimEcefPoint.h.

References theData.

206 {
207  return (theData != p.theData);
208 }
ossimColumnVector3d theData

◆ operator+()

ossimEcefPoint ossimEcefPoint::operator+ ( const ossimEcefVector v) const

Definition at line 70 of file ossimEcefPoint.cpp.

References ossimEcefVector::data(), ossimEcefPoint(), and theData.

71 {
72  return ossimEcefPoint(theData + v.data());
73 }
const ossimColumnVector3d & data() const
ossimColumnVector3d theData

◆ operator-() [1/2]

ossimEcefVector ossimEcefPoint::operator- ( const ossimEcefPoint p) const

OPERATORS:

Definition at line 62 of file ossimEcefPoint.cpp.

References theData.

63 {
64  return ossimEcefVector(theData - p.theData);
65 }
ossimColumnVector3d theData

◆ operator-() [2/2]

ossimEcefPoint ossimEcefPoint::operator- ( const ossimEcefVector v) const

Definition at line 78 of file ossimEcefPoint.cpp.

References ossimEcefVector::data(), ossimEcefPoint(), and theData.

79 {
80  return ossimEcefPoint(theData - v.data());
81 }
const ossimColumnVector3d & data() const
ossimColumnVector3d theData

◆ operator==()

bool ossimEcefPoint::operator== ( const ossimEcefPoint p) const
inline

Definition at line 197 of file ossimEcefPoint.h.

References theData.

198 {
199  return (theData == p.theData);
200 }
ossimColumnVector3d theData

◆ operator[]() [1/2]

double& ossimEcefPoint::operator[] ( int  idx)
inline

Definition at line 103 of file ossimEcefPoint.h.

103 {return theData[idx];}
ossimColumnVector3d theData

◆ operator[]() [2/2]

const double& ossimEcefPoint::operator[] ( int  idx) const
inline

Definition at line 104 of file ossimEcefPoint.h.

104 {return theData[idx];}
ossimColumnVector3d theData

◆ print()

void ossimEcefPoint::print ( std::ostream &  os = ossimNotify(ossimNotifyLevel_INFO)) const

Debug Dump:

Definition at line 93 of file ossimEcefPoint.cpp.

References isNan(), and theData.

Referenced by operator<<().

94 {
95  if(isNan())
96  {
97  os << "(ossimEcefPoint) " << "nan nan nan";
98  }
99 
100  os << "(ossimEcefPoint) " << theData;
101 }
bool isNan() const
ossimColumnVector3d theData

◆ toPoint() [1/2]

void ossimEcefPoint::toPoint ( const std::string &  s)

Initializes this point from string.

Expected format:

( 0.0000000, 0.0000000, 0.00000000 ) --—x-— --—y-— ---—z-—

Parameters
sString to initialize from.

Definition at line 88 of file ossimEcefPoint.cpp.

References theData, and ossimColumnVector3d::toPoint().

89 {
90  theData.toPoint(s);
91 }
void toPoint(const std::string &s)
Initializes this point from string.
ossimColumnVector3d theData

◆ toPoint() [2/2]

void ossimEcefPoint::toPoint ( const NEWMAT::ColumnVector &  v)
inline

Converts 3D column vector to this point.

Definition at line 170 of file ossimEcefPoint.h.

171  {
172  if (v.Nrows() == 3)
173  {
174  theData[0] = v[0];
175  theData[1] = v[1];
176  theData[2] = v[2];
177  }
178  }
ossimColumnVector3d theData

◆ toString()

ossimString ossimEcefPoint::toString ( ossim_uint32  precision = 15) const

To string method.

Parameters
precisionOutput floating point precision.
Returns
ossimString representing point.

Output format: ( 0.0000000, 0.0000000, 0.00000000 ) --—x-— --—y-— ---—z-—

Definition at line 83 of file ossimEcefPoint.cpp.

References theData, and ossimColumnVector3d::toString().

Referenced by ossimInfo::ecef2llh(), and ossimPpjFrameSensor::saveState().

84 {
85  return theData.toString(precision);
86 }
ossimString toString(ossim_uint32 precision=15) const
To string method.
ossimColumnVector3d theData

◆ toVector()

NEWMAT::ColumnVector ossimEcefPoint::toVector ( ) const
inline

Converts this point to a 3D column vector.

Definition at line 160 of file ossimEcefPoint.h.

161  {
162  NEWMAT::ColumnVector v (3);
163  v(0) = theData[0];
164  v(1) = theData[1];
165  v(2) = theData[2];
166  return v;
167  }
ossimColumnVector3d theData

◆ x() [1/2]

double ossimEcefPoint::x ( ) const
inline

◆ x() [2/2]

double& ossimEcefPoint::x ( )
inline

Definition at line 98 of file ossimEcefPoint.h.

98 { return theData[0]; }
ossimColumnVector3d theData

◆ y() [1/2]

double ossimEcefPoint::y ( ) const
inline

◆ y() [2/2]

double& ossimEcefPoint::y ( )
inline

Definition at line 100 of file ossimEcefPoint.h.

100 { return theData[1]; }
ossimColumnVector3d theData

◆ z() [1/2]

double ossimEcefPoint::z ( ) const
inline

◆ z() [2/2]

double& ossimEcefPoint::z ( )
inline

Definition at line 102 of file ossimEcefPoint.h.

102 { return theData[2]; }
ossimColumnVector3d theData

Friends And Related Function Documentation

◆ operator<<

OSSIM_DLL std::ostream& operator<< ( std::ostream &  os,
const ossimEcefPoint instance 
)
friend

Definition at line 103 of file ossimEcefPoint.cpp.

104 {
105  instance.print(os); return os;
106 }
void print(std::ostream &os=ossimNotify(ossimNotifyLevel_INFO)) const

Member Data Documentation

◆ theData

ossimColumnVector3d ossimEcefPoint::theData
protected

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