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

This class represents an InfoSceneCoord. More...

#include <InfoSceneCoord.h>

Public Member Functions

 InfoSceneCoord ()
 Constructor. More...
 
virtual ~InfoSceneCoord ()
 Destructor. More...
 
 InfoSceneCoord (const InfoSceneCoord &rhs)
 Copy constructor. More...
 
InfoSceneCoordoperator= (const InfoSceneCoord &rhs)
 Affectation operator. More...
 
bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 Method to save object state to a keyword list. More...
 
bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 Method to the load (recreate) the state of the object from a keyword list. More...
 
void set_refRow (ossim_uint32 value)
 
void set_refColumn (ossim_uint32 value)
 
void set_lat (double value)
 
void set_lon (double value)
 
void set_azimuthTimeUTC (ossimString value)
 
void set_rangeTime (double value)
 
void set_incidenceAngle (double value)
 

Protected Attributes

ossim_uint32 _refRow
 Reference Row (refRow node). More...
 
ossim_uint32 _refColumn
 Reference Column (refColumn node). More...
 
double _lat
 Latitude (lat node). More...
 
double _lon
 Longitude (lon node). More...
 
ossimString _azimuthTimeUTC
 azimuth time (azimuthTimeUTC node). More...
 
double _rangeTime
 range time (rangeTime node). More...
 
double _incidenceAngle
 IncidenceAngle (incidenceAngle node). More...
 

Detailed Description

This class represents an InfoSceneCoord.

Definition at line 29 of file InfoSceneCoord.h.

Constructor & Destructor Documentation

◆ InfoSceneCoord() [1/2]

ossimplugins::InfoSceneCoord::InfoSceneCoord ( )

Constructor.

Definition at line 31 of file InfoSceneCoord.cpp.

31  :
32  _refRow(0),
33  _refColumn(0),
34  _lat(0.0),
35  _lon(0.0),
37  _rangeTime(0.0),
38  _incidenceAngle(0.)
39 {
40 }
double _incidenceAngle
IncidenceAngle (incidenceAngle node).
ossimString _azimuthTimeUTC
azimuth time (azimuthTimeUTC node).
ossim_uint32 _refRow
Reference Row (refRow node).
ossim_uint32 _refColumn
Reference Column (refColumn node).
double _lon
Longitude (lon node).
double _lat
Latitude (lat node).
double _rangeTime
range time (rangeTime node).

◆ ~InfoSceneCoord()

ossimplugins::InfoSceneCoord::~InfoSceneCoord ( )
virtual

Destructor.

Definition at line 42 of file InfoSceneCoord.cpp.

43 {
44 }

◆ InfoSceneCoord() [2/2]

ossimplugins::InfoSceneCoord::InfoSceneCoord ( const InfoSceneCoord rhs)

Copy constructor.

Definition at line 47 of file InfoSceneCoord.cpp.

47  :
48  _refRow(rhs._refRow),
49  _refColumn(rhs._refColumn),
50  _lat(rhs._lat),
51  _lon(rhs._lon),
52  _azimuthTimeUTC(rhs._azimuthTimeUTC),
53  _rangeTime(rhs._rangeTime),
54  _incidenceAngle(rhs._incidenceAngle)
55 {
56 }
double _incidenceAngle
IncidenceAngle (incidenceAngle node).
ossimString _azimuthTimeUTC
azimuth time (azimuthTimeUTC node).
ossim_uint32 _refRow
Reference Row (refRow node).
ossim_uint32 _refColumn
Reference Column (refColumn node).
double _lon
Longitude (lon node).
double _lat
Latitude (lat node).
double _rangeTime
range time (rangeTime node).

Member Function Documentation

◆ loadState()

bool ossimplugins::InfoSceneCoord::loadState ( const ossimKeywordlist kwl,
const char *  prefix = 0 
)

Method to the load (recreate) the state of the object from a keyword list.

Return true if ok or false on error.

Returns
true if load OK, false on error

Definition at line 89 of file InfoSceneCoord.cpp.

References _azimuthTimeUTC, _incidenceAngle, _lat, _lon, _rangeTime, _refColumn, _refRow, ossimKeywordlist::find(), ossimNotify(), ossimNotifyLevel_WARN, ossimString::toDouble(), and ossimString::toUInt32().

Referenced by ossimplugins::SceneCoord::loadState().

90 {
91  static const char MODULE[] = "InfoSceneCoord::loadState";
92  bool result = true;
93  std::string pfx;
94  if (prefix)
95  {
96  pfx = prefix;
97  }
98  ossimString s;
99  const char* lookup = 0;
100 
101  pfx += PREFIX;
102  lookup = kwl.find(pfx.c_str(), REF_ROW);
103  if (lookup)
104  {
105  s = lookup;
106  _refRow = s.toUInt32();
107  }
108  else
109  {
111  << MODULE << " Keyword not found: " << REF_ROW << " in "<<pfx.c_str()<<" path.\n";
112  result = false;
113  }
114 
115  lookup = kwl.find(pfx.c_str(), REF_COLUMN);
116  if (lookup)
117  {
118  s = lookup;
119  _refColumn = s.toUInt32();
120  }
121  else
122  {
124  << MODULE << " Keyword not found: " << REF_COLUMN << " in "<<pfx.c_str()<<" path.\n";
125  result = false;
126  }
127 
128  lookup = kwl.find(pfx.c_str(), LAT);
129  if (lookup)
130  {
131  s = lookup;
132  _lat = s.toDouble();
133  }
134  else
135  {
137  << MODULE << " Keyword not found: " << LAT << " in "<<pfx.c_str()<<" path.\n";
138  result = false;
139  }
140 
141  lookup = kwl.find(pfx.c_str(), LON);
142  if (lookup)
143  {
144  s = lookup;
145  _lon = s.toDouble();
146  }
147  else
148  {
150  << MODULE << " Keyword not found: " << LON << " in "<<pfx.c_str()<<" path.\n";
151  result = false;
152  }
153 
154  lookup = kwl.find(pfx.c_str(), AZIMUTH_TIME);
155  if (lookup)
156  {
157  s = lookup;
158  _azimuthTimeUTC = s;
159  }
160  else
161  {
163  << MODULE << " Keyword not found: " << AZIMUTH_TIME << " in "<<pfx.c_str()<<" path.\n";
164  result = false;
165  }
166 
167  lookup = kwl.find(pfx.c_str(), RANGE_TIME);
168  if (lookup)
169  {
170  s = lookup;
171  _rangeTime = s.toDouble();
172  }
173  else
174  {
176  << MODULE << " Keyword not found: " << RANGE_TIME << " in "<<pfx.c_str()<<" path.\n";
177  result = false;
178  }
179 
180  lookup = kwl.find(pfx.c_str(), INCIDENCE_ANGLE);
181  if (lookup)
182  {
183  s = lookup;
185  }
186  else
187  {
189  << MODULE << " Keyword not found: " << INCIDENCE_ANGLE << " in "<<pfx.c_str()<<" path.\n";
190  result = false;
191  }
192 
193  return result;
194 }
double _incidenceAngle
IncidenceAngle (incidenceAngle node).
const char * find(const char *key) const
ossim_uint32 toUInt32() const
ossimString _azimuthTimeUTC
azimuth time (azimuthTimeUTC node).
double toDouble() const
ossim_uint32 _refRow
Reference Row (refRow node).
ossim_uint32 _refColumn
Reference Column (refColumn node).
double _lon
Longitude (lon node).
double _lat
Latitude (lat node).
double _rangeTime
range time (rangeTime node).
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ operator=()

InfoSceneCoord & ossimplugins::InfoSceneCoord::operator= ( const InfoSceneCoord rhs)

Affectation operator.

Definition at line 58 of file InfoSceneCoord.cpp.

References _azimuthTimeUTC, _incidenceAngle, _lat, _lon, _rangeTime, _refColumn, and _refRow.

59 {
60  _refRow = rhs._refRow;
61  _refColumn = rhs._refColumn;
62  _lat = rhs._lat;
63  _lon = rhs._lon;
64  _azimuthTimeUTC = rhs._azimuthTimeUTC;
65  _rangeTime =rhs._rangeTime;
66  _incidenceAngle = rhs._incidenceAngle;
67  return *this;
68 }
double _incidenceAngle
IncidenceAngle (incidenceAngle node).
ossimString _azimuthTimeUTC
azimuth time (azimuthTimeUTC node).
ossim_uint32 _refRow
Reference Row (refRow node).
ossim_uint32 _refColumn
Reference Column (refColumn node).
double _lon
Longitude (lon node).
double _lat
Latitude (lat node).
double _rangeTime
range time (rangeTime node).

◆ saveState()

bool ossimplugins::InfoSceneCoord::saveState ( ossimKeywordlist kwl,
const char *  prefix = 0 
) const

Method to save object state to a keyword list.

Parameters
kwlKeyword list to save to.
prefixadded to keys when saved.
Returns
true on success, false on error.

Definition at line 70 of file InfoSceneCoord.cpp.

References _azimuthTimeUTC, _incidenceAngle, _lat, _lon, _rangeTime, _refColumn, _refRow, and ossimKeywordlist::add().

Referenced by ossimplugins::SceneCoord::print(), and ossimplugins::SceneCoord::saveState().

71 {
72  std::string pfx;
73  if (prefix)
74  {
75  pfx = prefix;
76  }
77  pfx += PREFIX;
78  kwl.add(pfx.c_str(), REF_ROW, _refRow);
79  kwl.add(pfx.c_str(), REF_COLUMN, _refColumn);
80  kwl.add(pfx.c_str(), LAT, _lat);
81  kwl.add(pfx.c_str(), LON, _lon);
82  kwl.add(pfx.c_str(), AZIMUTH_TIME, _azimuthTimeUTC);
83  kwl.add(pfx.c_str(), RANGE_TIME, _rangeTime);
84  kwl.add(pfx.c_str(), INCIDENCE_ANGLE, _incidenceAngle);
85 
86  return true;
87 }
double _incidenceAngle
IncidenceAngle (incidenceAngle node).
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
ossimString _azimuthTimeUTC
azimuth time (azimuthTimeUTC node).
ossim_uint32 _refRow
Reference Row (refRow node).
ossim_uint32 _refColumn
Reference Column (refColumn node).
double _lon
Longitude (lon node).
double _lat
Latitude (lat node).
double _rangeTime
range time (rangeTime node).

◆ set_azimuthTimeUTC()

void ossimplugins::InfoSceneCoord::set_azimuthTimeUTC ( ossimString  value)
inline

Definition at line 83 of file InfoSceneCoord.h.

Referenced by ossimplugins::ossimTerraSarProductDoc::initSceneCoord().

84  {
85  _azimuthTimeUTC = value;
86  }
ossimString _azimuthTimeUTC
azimuth time (azimuthTimeUTC node).

◆ set_incidenceAngle()

void ossimplugins::InfoSceneCoord::set_incidenceAngle ( double  value)
inline

Definition at line 91 of file InfoSceneCoord.h.

Referenced by ossimplugins::ossimTerraSarProductDoc::initSceneCoord().

92  {
93  _incidenceAngle = value;
94  }
double _incidenceAngle
IncidenceAngle (incidenceAngle node).

◆ set_lat()

void ossimplugins::InfoSceneCoord::set_lat ( double  value)
inline

Definition at line 75 of file InfoSceneCoord.h.

Referenced by ossimplugins::ossimTerraSarProductDoc::initSceneCoord().

76  {
77  _lat = value;
78  }
double _lat
Latitude (lat node).

◆ set_lon()

void ossimplugins::InfoSceneCoord::set_lon ( double  value)
inline

Definition at line 79 of file InfoSceneCoord.h.

Referenced by ossimplugins::ossimTerraSarProductDoc::initSceneCoord().

80  {
81  _lon = value;
82  }
double _lon
Longitude (lon node).

◆ set_rangeTime()

void ossimplugins::InfoSceneCoord::set_rangeTime ( double  value)
inline

Definition at line 87 of file InfoSceneCoord.h.

Referenced by ossimplugins::ossimTerraSarProductDoc::initSceneCoord().

88  {
89  _rangeTime = value;
90  }
double _rangeTime
range time (rangeTime node).

◆ set_refColumn()

void ossimplugins::InfoSceneCoord::set_refColumn ( ossim_uint32  value)
inline

Definition at line 71 of file InfoSceneCoord.h.

Referenced by ossimplugins::ossimTerraSarProductDoc::initSceneCoord().

72  {
73  _refColumn = value;
74  }
ossim_uint32 _refColumn
Reference Column (refColumn node).

◆ set_refRow()

void ossimplugins::InfoSceneCoord::set_refRow ( ossim_uint32  value)
inline

Definition at line 67 of file InfoSceneCoord.h.

Referenced by ossimplugins::ossimTerraSarProductDoc::initSceneCoord().

68  {
69  _refRow = value;
70  }
ossim_uint32 _refRow
Reference Row (refRow node).

Member Data Documentation

◆ _azimuthTimeUTC

ossimString ossimplugins::InfoSceneCoord::_azimuthTimeUTC
protected

azimuth time (azimuthTimeUTC node).

Definition at line 119 of file InfoSceneCoord.h.

Referenced by loadState(), operator=(), and saveState().

◆ _incidenceAngle

double ossimplugins::InfoSceneCoord::_incidenceAngle
protected

IncidenceAngle (incidenceAngle node).

Definition at line 127 of file InfoSceneCoord.h.

Referenced by loadState(), operator=(), and saveState().

◆ _lat

double ossimplugins::InfoSceneCoord::_lat
protected

Latitude (lat node).

Definition at line 111 of file InfoSceneCoord.h.

Referenced by loadState(), operator=(), and saveState().

◆ _lon

double ossimplugins::InfoSceneCoord::_lon
protected

Longitude (lon node).

Definition at line 115 of file InfoSceneCoord.h.

Referenced by loadState(), operator=(), and saveState().

◆ _rangeTime

double ossimplugins::InfoSceneCoord::_rangeTime
protected

range time (rangeTime node).

Definition at line 123 of file InfoSceneCoord.h.

Referenced by loadState(), operator=(), and saveState().

◆ _refColumn

ossim_uint32 ossimplugins::InfoSceneCoord::_refColumn
protected

Reference Column (refColumn node).

Definition at line 107 of file InfoSceneCoord.h.

Referenced by loadState(), operator=(), and saveState().

◆ _refRow

ossim_uint32 ossimplugins::InfoSceneCoord::_refRow
protected

Reference Row (refRow node).

Definition at line 102 of file InfoSceneCoord.h.

Referenced by loadState(), operator=(), and saveState().


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