OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimLsrPoint.cpp
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // DESCRIPTION:
6 // Contains declaration of a 3D point object in the Earth-centered, earth
7 // fixed (ECEF) coordinate system.
8 //
9 // SOFTWARE HISTORY:
10 //>
11 // 08Aug2001 Oscar Kramer (okramer@imagelinks.com)
12 // Initial coding.
13 //<
14 //*****************************************************************************
15 // $Log$
16 // Revision 1.4 2006/11/28 21:09:36 gpotts
17 // Fixing copyrights
18 //
19 // Revision 1.3 2006/06/13 19:10:52 dburken
20 // Global include path change.
21 //
22 // Revision 1.2 2003/05/02 15:34:17 dburken
23 // Fixed build errors on AIX VisualAge compiler. <dburken@imagelinks.com>
24 //
25 // Revision 1.1 2001/08/13 21:29:18 okramer
26 // Initial delivery of ECEF and LSR suite. (okramer@imagelinks.com)
27 //
28 
30 #include <ossim/base/ossimGpt.h>
33 
34 //*****************************************************************************
35 // CONSTRUCTOR: ossimLsrPoint(ossimLsrPoint, space)
36 //
37 //*****************************************************************************
39  const ossimLsrSpace& new_space)
40  : theLsrSpace(new_space)
41 {
42  initialize(ossimEcefPoint(convert_this));
43 }
44 
45 //*****************************************************************************
46 // CONSTRUCTOR: ossimLsrPoint(const ossimLsrPoint& convert_this)
47 //
48 //*****************************************************************************
50  const ossimLsrSpace& space)
51  : theLsrSpace(space)
52 {
54 }
55 
56 //*****************************************************************************
57 // CONSTRUCTOR: ossimLsrPoint(const ossimLsrPoint& convert_this)
58 //
59 //*****************************************************************************
61  const ossimLsrSpace& space)
62  : theLsrSpace(space)
63 {
64  initialize(convert_this);
65 }
66 
67 //*****************************************************************************
68 // PROTECTED METHOD: ossimLsrPoint::initialize(ossimEcefPoint)
69 //
70 // Convenience method used by several constructors for initializing theData
71 // given an ECEF point. Assumes theLsrSpace has been previously initialized.
72 //
73 //*****************************************************************************
75 {
76  if(ecef_point.hasNans())
77  {
78  makeNan();
79  }
80  else
81  {
82  //
83  // Translate to new space given the space's offset origin:
84  //
85  ossimColumnVector3d xlated ((ecef_point - theLsrSpace.origin()).data());
86 
87  //
88  // Rotate by the inverse (transpose) of the LSR-to-ECEF rot matrix:
89  //
91  }
92 }
93 
94 //*****************************************************************************
95 // OPERATOR: ossimLsrPoint::operator-(ossimLsrPoint)
96 //
97 //*****************************************************************************
99 {
100  if(hasNans()||p.hasNans()||(theLsrSpace != p.lsrSpace()))
101  {
104 
105  }
107 }
108 
109 //*****************************************************************************
110 // OPERATOR: ossimLsrPoint::operator+(ossimLsrVector)
111 //
112 //*****************************************************************************
114 {
115  if(hasNans()||v.hasNans()||(theLsrSpace != v.lsrSpace()))
116  {
119 
120  }
121  return ossimLsrPoint(theData + v.data(), theLsrSpace);
122 }
123 
static ostream & lsrSpaceErrorMessage(ostream &os=ossimNotify(ossimNotifyLevel_INFO))
ossimLsrPoint operator+(const ossimLsrVector &) const
bool hasNans() const
double nan()
Method to return ieee floating point double precision NAN.
Definition: ossimCommon.h:135
ossimLsrSpace & lsrSpace()
ossimColumnVector3d & data()
bool hasNans() const
ossimColumnVector3d & data()
Definition: ossimLsrPoint.h:92
void initialize(const ossimEcefPoint &ecef_point)
bool hasNans() const
Definition: ossimLsrPoint.h:98
NEWMAT::Matrix ecefToLsrRotMatrix() const
const ossimEcefPoint & origin() const
ossimLsrSpace theLsrSpace
ossimLsrSpace & lsrSpace()
Definition: ossimLsrPoint.h:95
ossimColumnVector3d theData
ossimLsrVector operator-(const ossimLsrPoint &) const