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

This class is able to read the ASAR GeolocationGrid record. More...

#include <GeolocationGrid.h>

Inheritance diagram for ossimplugins::GeolocationGrid:
ossimplugins::EnvisatAsarRecord

Public Member Functions

 GeolocationGrid ()
 Constructor. More...
 
virtual ~GeolocationGrid ()
 Destructor. More...
 
 GeolocationGrid (const GeolocationGrid &rhs)
 Copy constructor. More...
 
GeolocationGridoperator= (const GeolocationGrid &rhs)
 Copy operator. More...
 
EnvisatAsarRecordInstanciate ()
 This function is able to create a new instance of the class. More...
 
EnvisatAsarRecordClone ()
 This function is able to create a new instance of the class initialised with the data of the calling instance. More...
 
void Read (std::istream &is)
 Reads the class data from a stream. More...
 
void Write (std::ostream &os)
 Writes the class to a stream. More...
 
int get_first_zero_doppler_time_day ()
 first_zero_doppler_time day More...
 
unsigned int get_first_zero_doppler_time_sec ()
 first_zero_doppler_time second More...
 
unsigned int get_first_zero_doppler_time_microsec ()
 first_zero_doppler_time micro sec More...
 
bool get_attach_flag ()
 attach_flag More...
 
unsigned int get_line_num ()
 line_num More...
 
unsigned int get_num_lines ()
 num_lines More...
 
float get_sub_sat_track ()
 sub_sat_track More...
 
unsigned int * get_samp_numbers ()
 samp_numbvers More...
 
float * get_slant_range_times ()
 slant_range_times More...
 
float * get_angles ()
 angles More...
 
int * get_lats ()
 lats More...
 
int * get_longs ()
 longs More...
 
std::string get_last_zero_doppler_time ()
 last_zero_doppler_time More...
 
std::string get_last_line_tie_points ()
 last_line_tie_points More...
 
- Public Member Functions inherited from ossimplugins::EnvisatAsarRecord
 EnvisatAsarRecord (std::string mnemonic)
 Constructor. More...
 
virtual ~EnvisatAsarRecord ()
 Destructor. More...
 
 EnvisatAsarRecord (const EnvisatAsarRecord &rhs)
 Copy constructor. More...
 
std::string get_mnemonic ()
 Returns the mnemonic of the record. More...
 

Public Attributes

int _first_zero_doppler_time_day
 first_zero_doppler_time day More...
 
unsigned int _first_zero_doppler_time_sec
 first_zero_doppler_time sec More...
 
unsigned int _first_zero_doppler_time_microsec
 first_zero_doppler_time microsec More...
 
bool _attach_flag
 attach_flag More...
 
unsigned int _line_num
 line_num More...
 
unsigned int _num_lines
 num_lines More...
 
float _sub_sat_track
 sub_sat_track More...
 
unsigned int _samp_numbers [11]
 samp_numbers More...
 
float _slant_range_times [11]
 slant_range_times[11] More...
 
float _angles [11]
 angles[11] More...
 
int _lats [11]
 lats[11] More...
 
int _longs [11]
 longs[11] More...
 
std::string _last_zero_doppler_time
 last_zero_doppler_time More...
 
std::string _last_line_tie_points
 last_line_tie_points More...
 

Friends

std::ostream & operator<< (std::ostream &os, const GeolocationGrid &data)
 This function writes the GeolocationGrid in a stream. More...
 
std::istream & operator>> (std::istream &is, GeolocationGrid &data)
 This function reads a GeolocationGrid from a stream. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ossimplugins::EnvisatAsarRecord
template<typename T >
void SwitchEndian (T &value)
 This function switches the LSB value and the MSB value of the parameter. More...
 
- Protected Attributes inherited from ossimplugins::EnvisatAsarRecord
std::string _mnemonic
 

Detailed Description

This class is able to read the ASAR GeolocationGrid record.

Definition at line 24 of file GeolocationGrid.h.

Constructor & Destructor Documentation

◆ GeolocationGrid() [1/2]

ossimplugins::GeolocationGrid::GeolocationGrid ( )

Constructor.

Definition at line 16 of file GeolocationGrid.cpp.

Referenced by Clone(), and Instanciate().

16  : EnvisatAsarRecord("GeolocationGrid_rec")
17  {
18  }
EnvisatAsarRecord(std::string mnemonic)
Constructor.

◆ ~GeolocationGrid()

ossimplugins::GeolocationGrid::~GeolocationGrid ( )
virtual

Destructor.

Definition at line 20 of file GeolocationGrid.cpp.

21  {
22  }

◆ GeolocationGrid() [2/2]

ossimplugins::GeolocationGrid::GeolocationGrid ( const GeolocationGrid rhs)

Copy constructor.

Definition at line 170 of file GeolocationGrid.cpp.

References _angles, _lats, _longs, _samp_numbers, and _slant_range_times.

170  :
171  EnvisatAsarRecord(rhs),
172  _first_zero_doppler_time_day(rhs._first_zero_doppler_time_day),
173  _first_zero_doppler_time_sec(rhs._first_zero_doppler_time_sec),
174  _first_zero_doppler_time_microsec(rhs._first_zero_doppler_time_microsec),
175  _attach_flag(rhs._attach_flag),
176  _line_num(rhs._line_num),
177  _num_lines(rhs._num_lines),
178  _sub_sat_track(rhs._sub_sat_track),
179  _last_zero_doppler_time(rhs._last_zero_doppler_time),
180  _last_line_tie_points(rhs._last_line_tie_points)
181  {
182 
183  for (int i = 0; i<11; i++) {
184  _samp_numbers[i] = rhs._samp_numbers[i];
185  _slant_range_times[i] = rhs._slant_range_times[i];
186  _angles[i] = rhs._angles[i];
187  _lats[i] = rhs._lats[i];
188  _longs[i] = rhs._longs[i];
189  }
190 
191 
192  }
float _slant_range_times[11]
slant_range_times[11]
unsigned int _samp_numbers[11]
samp_numbers
unsigned int _first_zero_doppler_time_sec
first_zero_doppler_time sec
float _angles[11]
angles[11]
unsigned int _first_zero_doppler_time_microsec
first_zero_doppler_time microsec
std::string _last_line_tie_points
last_line_tie_points
int _first_zero_doppler_time_day
first_zero_doppler_time day
float _sub_sat_track
sub_sat_track
std::string _last_zero_doppler_time
last_zero_doppler_time
unsigned int _line_num
line_num
EnvisatAsarRecord(std::string mnemonic)
Constructor.
unsigned int _num_lines
num_lines

Member Function Documentation

◆ Clone()

EnvisatAsarRecord* ossimplugins::GeolocationGrid::Clone ( )
inlinevirtual

This function is able to create a new instance of the class initialised with the data of the calling instance.

Implements ossimplugins::EnvisatAsarRecord.

Definition at line 68 of file GeolocationGrid.h.

References GeolocationGrid().

69  {
70  return new GeolocationGrid(*this);
71  };

◆ get_angles()

float* ossimplugins::GeolocationGrid::get_angles ( )
inline

angles

Definition at line 155 of file GeolocationGrid.h.

References _angles.

156  {
157  return _angles;
158  };
float _angles[11]
angles[11]

◆ get_attach_flag()

bool ossimplugins::GeolocationGrid::get_attach_flag ( )
inline

attach_flag

Definition at line 113 of file GeolocationGrid.h.

References _attach_flag.

114  {
115  return _attach_flag;
116  };

◆ get_first_zero_doppler_time_day()

int ossimplugins::GeolocationGrid::get_first_zero_doppler_time_day ( )
inline

first_zero_doppler_time day

Definition at line 92 of file GeolocationGrid.h.

References _first_zero_doppler_time_day.

Referenced by ossimplugins::ossimEnvisatAsarModel::saveState().

93  {
95  };
int _first_zero_doppler_time_day
first_zero_doppler_time day

◆ get_first_zero_doppler_time_microsec()

unsigned int ossimplugins::GeolocationGrid::get_first_zero_doppler_time_microsec ( )
inline

first_zero_doppler_time micro sec

Definition at line 106 of file GeolocationGrid.h.

References _first_zero_doppler_time_microsec.

Referenced by ossimplugins::ossimEnvisatAsarModel::saveState().

107  {
109  };
unsigned int _first_zero_doppler_time_microsec
first_zero_doppler_time microsec

◆ get_first_zero_doppler_time_sec()

unsigned int ossimplugins::GeolocationGrid::get_first_zero_doppler_time_sec ( )
inline

first_zero_doppler_time second

Definition at line 99 of file GeolocationGrid.h.

References _first_zero_doppler_time_sec.

Referenced by ossimplugins::ossimEnvisatAsarModel::saveState().

100  {
102  };
unsigned int _first_zero_doppler_time_sec
first_zero_doppler_time sec

◆ get_last_line_tie_points()

std::string ossimplugins::GeolocationGrid::get_last_line_tie_points ( )
inline

last_line_tie_points

Definition at line 183 of file GeolocationGrid.h.

References _last_line_tie_points.

184  {
185  return _last_line_tie_points;
186  };
std::string _last_line_tie_points
last_line_tie_points

◆ get_last_zero_doppler_time()

std::string ossimplugins::GeolocationGrid::get_last_zero_doppler_time ( )
inline

last_zero_doppler_time

Definition at line 176 of file GeolocationGrid.h.

References _last_zero_doppler_time.

177  {
179  };
std::string _last_zero_doppler_time
last_zero_doppler_time

◆ get_lats()

int* ossimplugins::GeolocationGrid::get_lats ( )
inline

lats

Definition at line 162 of file GeolocationGrid.h.

References _lats.

Referenced by ossimplugins::ossimEnvisatAsarModel::saveState().

163  {
164  return _lats;
165  };

◆ get_line_num()

unsigned int ossimplugins::GeolocationGrid::get_line_num ( )
inline

line_num

Definition at line 120 of file GeolocationGrid.h.

References _line_num.

Referenced by ossimplugins::ossimEnvisatAsarModel::saveState().

121  {
122  return _line_num;
123  };
unsigned int _line_num
line_num

◆ get_longs()

int* ossimplugins::GeolocationGrid::get_longs ( )
inline

longs

Definition at line 169 of file GeolocationGrid.h.

References _longs.

Referenced by ossimplugins::ossimEnvisatAsarModel::saveState().

170  {
171  return _longs;
172  };

◆ get_num_lines()

unsigned int ossimplugins::GeolocationGrid::get_num_lines ( )
inline

num_lines

Definition at line 127 of file GeolocationGrid.h.

References _num_lines.

128  {
129  return _num_lines;
130  };
unsigned int _num_lines
num_lines

◆ get_samp_numbers()

unsigned int* ossimplugins::GeolocationGrid::get_samp_numbers ( )
inline

samp_numbvers

Definition at line 141 of file GeolocationGrid.h.

References _samp_numbers.

Referenced by ossimplugins::ossimEnvisatAsarModel::saveState().

142  {
143  return _samp_numbers;
144  };
unsigned int _samp_numbers[11]
samp_numbers

◆ get_slant_range_times()

float* ossimplugins::GeolocationGrid::get_slant_range_times ( )
inline

slant_range_times

Definition at line 148 of file GeolocationGrid.h.

References _slant_range_times.

Referenced by ossimplugins::ossimEnvisatAsarModel::saveState().

149  {
150  return _slant_range_times;
151  };
float _slant_range_times[11]
slant_range_times[11]

◆ get_sub_sat_track()

float ossimplugins::GeolocationGrid::get_sub_sat_track ( )
inline

sub_sat_track

Definition at line 134 of file GeolocationGrid.h.

References _sub_sat_track.

135  {
136  return _sub_sat_track;
137  };
float _sub_sat_track
sub_sat_track

◆ Instanciate()

EnvisatAsarRecord* ossimplugins::GeolocationGrid::Instanciate ( )
inlinevirtual

This function is able to create a new instance of the class.

Implements ossimplugins::EnvisatAsarRecord.

Definition at line 60 of file GeolocationGrid.h.

References GeolocationGrid().

61  {
62  return new GeolocationGrid();
63  };

◆ operator=()

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

Copy operator.

Definition at line 195 of file GeolocationGrid.cpp.

References _angles, _attach_flag, _first_zero_doppler_time_day, _first_zero_doppler_time_microsec, _first_zero_doppler_time_sec, _last_line_tie_points, _last_zero_doppler_time, _lats, _line_num, _longs, _num_lines, _samp_numbers, _slant_range_times, and _sub_sat_track.

196  {
197  _first_zero_doppler_time_day = rhs._first_zero_doppler_time_day;
198  _first_zero_doppler_time_sec = rhs._first_zero_doppler_time_sec;
199  _first_zero_doppler_time_microsec = rhs._first_zero_doppler_time_microsec;
200  _attach_flag = rhs._attach_flag;
201  _line_num = rhs._line_num;
202  _num_lines = rhs._num_lines;
203  _sub_sat_track = rhs._sub_sat_track;
204  _last_zero_doppler_time = rhs._last_zero_doppler_time;
205  _last_line_tie_points = rhs._last_line_tie_points;
206 
207  for (int i = 0; i<11; i++) {
208  _samp_numbers[i] = rhs._samp_numbers[i];
209  _slant_range_times[i] = rhs._slant_range_times[i];
210  _angles[i] = rhs._angles[i];
211  _lats[i] = rhs._lats[i];
212  _longs[i] = rhs._longs[i];
213  }
214 
215  return *this;
216  }
float _slant_range_times[11]
slant_range_times[11]
unsigned int _samp_numbers[11]
samp_numbers
unsigned int _first_zero_doppler_time_sec
first_zero_doppler_time sec
float _angles[11]
angles[11]
unsigned int _first_zero_doppler_time_microsec
first_zero_doppler_time microsec
std::string _last_line_tie_points
last_line_tie_points
int _first_zero_doppler_time_day
first_zero_doppler_time day
float _sub_sat_track
sub_sat_track
std::string _last_zero_doppler_time
last_zero_doppler_time
unsigned int _line_num
line_num
unsigned int _num_lines
num_lines

◆ Read()

void ossimplugins::GeolocationGrid::Read ( std::istream &  is)
inlinevirtual

Reads the class data from a stream.

Implements ossimplugins::EnvisatAsarRecord.

Definition at line 76 of file GeolocationGrid.h.

77  {
78  is>>*this;
79  };

◆ Write()

void ossimplugins::GeolocationGrid::Write ( std::ostream &  os)
inlinevirtual

Writes the class to a stream.

Implements ossimplugins::EnvisatAsarRecord.

Definition at line 84 of file GeolocationGrid.h.

85  {
86  os<<*this;
87  };

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const GeolocationGrid data 
)
friend

This function writes the GeolocationGrid in a stream.

Definition at line 25 of file GeolocationGrid.cpp.

26  {
27  os<<"first_zero_doppler_time_day:"<<data._first_zero_doppler_time_day<<std::endl;
28 
29  os<<"first_zero_doppler_time_sec:"<<data._first_zero_doppler_time_sec<<std::endl;
30 
31  os<<"first_zero_doppler_time_microsec:"<<data._first_zero_doppler_time_microsec<<std::endl;
32 
33  os<<"attach_flag:"<<data._attach_flag<<std::endl;
34 
35  os<<"line_num:"<<data._line_num<<std::endl;
36 
37  os<<"num_lines:"<<data._num_lines<<std::endl;
38 
39  os<<"sub_sat_track:"<<data._sub_sat_track<<std::endl;
40 
41  for (int i = 0; i<11; i++) {
42  os<<"samp_numbers["<<i<<"]:"<<data._samp_numbers[i]<<std::endl;
43  }
44 
45  for (int i = 0; i<11; i++) {
46  os<<"slant_range_times["<<i<<"]:"<<data._slant_range_times[i]<<std::endl;
47  }
48 
49  for (int i = 0; i<11; i++) {
50  os<<"angles["<<i<<"]:"<<data._angles[i]<<std::endl;
51  }
52 
53  for (int i = 0; i<11; i++) {
54  os<<"lats["<<i<<"]:"<<data._lats[i]<<std::endl;
55  }
56 
57  for (int i = 0; i<11; i++) {
58  os<<"longs["<<i<<"]:"<<data._longs[i]<<std::endl;
59  }
60 
61  os<<"last_zero_doppler_time:"<<data._last_zero_doppler_time.c_str()<<std::endl;
62 
63  os<<"last_line_tie_points:"<<data._last_line_tie_points.c_str()<<std::endl;
64 
65  return os;
66 
67  }

◆ operator>>

std::istream& operator>> ( std::istream &  is,
GeolocationGrid data 
)
friend

This function reads a GeolocationGrid from a stream.

Definition at line 69 of file GeolocationGrid.cpp.

70  {
71  char buf220[221];
72  buf220[220] = '\0';
73  char buf32[33];
74  buf32[32] = '\0';
75  // char buf27[28];
76  // buf27[27] = '\0';
77  // char buf20[21];
78  // buf20[20] = '\0';
79  // char buf16[17];
80  // buf16[16]='\0';
81  // char buf15[16];
82  // buf15[15] = '\0';
83  // char buf14[15];
84  // buf14[14] = '\0';
85  // char buf13[14];
86  // buf13[13] = '\0';
87  char buf12[13];
88  buf12[12] = '\0';
89  // char buf11[12];
90  // buf11[11] = '\0';
91  // char buf10[11];
92  // buf10[10] = '\0';
93  // char buf9[10];
94  // buf9[9] = '\0';
95  // char buf8[9];
96  // buf8[8] = '\0';
97  // char buf7[8];
98  // buf7[7] = '\0';
99  // char buf6[7];
100  // buf6[6] = '\0';
101  // char buf5[6];
102  // buf5[5] = '\0';
103  // char buf4[5];
104  // buf4[4] = '\0';
105  // char buf3[4];
106  // buf3[3] = '\0';
107  // char buf2[3];
108  // buf2[2] = '\0';
109 // char buf1[1]; // not used avoid warning
110 
111  is.read((char*)&(data._first_zero_doppler_time_day),4);
112  data.SwitchEndian(data._first_zero_doppler_time_day);
113 
114  is.read((char*)&(data._first_zero_doppler_time_sec),4);
115  data.SwitchEndian(data._first_zero_doppler_time_sec);
116 
117  is.read((char*)&(data._first_zero_doppler_time_microsec),4);
118  data.SwitchEndian(data._first_zero_doppler_time_microsec);
119 
120  is.read((char*)&(data._attach_flag),1);
121 
122  is.read((char*)&(data._line_num),4);
123  data.SwitchEndian(data._line_num);
124 
125  is.read((char*)&(data._num_lines),4);
126  data.SwitchEndian(data._num_lines);
127 
128  is.read((char*)&(data._sub_sat_track),4);
129  data.SwitchEndian(data._sub_sat_track);
130 
131  for (int i = 0; i<11; i++) {
132  is.read((char*)&(data._samp_numbers[i]),4);
133  data.SwitchEndian(data._samp_numbers[i]);
134  }
135 
136  for (int i = 0; i<11; i++) {
137  is.read((char*)&(data._slant_range_times[i]),4);
138  data.SwitchEndian(data._slant_range_times[i]);
139  }
140 
141  for (int i = 0; i<11; i++) {
142  is.read((char*)&(data._angles[i]),4);
143  data.SwitchEndian(data._angles[i]);
144  }
145 
146  for (int i = 0; i<11; i++) {
147  is.read((char*)&(data._lats[i]),4);
148  data.SwitchEndian(data._lats[i]);
149  }
150 
151  for (int i = 0; i<11; i++) {
152  is.read((char*)&(data._longs[i]),4);
153  data.SwitchEndian(data._longs[i]);
154  }
155 
156  is.read(buf32,22);
157 
158  is.read(buf12,12);
159  data._last_zero_doppler_time = buf12;
160 
161  is.read(buf220,220);
162  data._last_line_tie_points = buf220;
163 
164  is.read(buf32,22);
165 
166  return is;
167 
168  }

Member Data Documentation

◆ _angles

float ossimplugins::GeolocationGrid::_angles[11]

◆ _attach_flag

bool ossimplugins::GeolocationGrid::_attach_flag

attach_flag

Definition at line 204 of file GeolocationGrid.h.

Referenced by get_attach_flag(), ossimplugins::operator<<(), operator=(), and ossimplugins::operator>>().

◆ _first_zero_doppler_time_day

int ossimplugins::GeolocationGrid::_first_zero_doppler_time_day

first_zero_doppler_time day

Definition at line 186 of file GeolocationGrid.h.

Referenced by get_first_zero_doppler_time_day(), ossimplugins::operator<<(), operator=(), and ossimplugins::operator>>().

◆ _first_zero_doppler_time_microsec

unsigned int ossimplugins::GeolocationGrid::_first_zero_doppler_time_microsec

first_zero_doppler_time microsec

Definition at line 200 of file GeolocationGrid.h.

Referenced by get_first_zero_doppler_time_microsec(), ossimplugins::operator<<(), operator=(), and ossimplugins::operator>>().

◆ _first_zero_doppler_time_sec

unsigned int ossimplugins::GeolocationGrid::_first_zero_doppler_time_sec

first_zero_doppler_time sec

Definition at line 196 of file GeolocationGrid.h.

Referenced by get_first_zero_doppler_time_sec(), ossimplugins::operator<<(), operator=(), and ossimplugins::operator>>().

◆ _last_line_tie_points

std::string ossimplugins::GeolocationGrid::_last_line_tie_points

last_line_tie_points

Definition at line 244 of file GeolocationGrid.h.

Referenced by get_last_line_tie_points(), ossimplugins::operator<<(), operator=(), and ossimplugins::operator>>().

◆ _last_zero_doppler_time

std::string ossimplugins::GeolocationGrid::_last_zero_doppler_time

last_zero_doppler_time

Definition at line 240 of file GeolocationGrid.h.

Referenced by get_last_zero_doppler_time(), ossimplugins::operator<<(), operator=(), and ossimplugins::operator>>().

◆ _lats

int ossimplugins::GeolocationGrid::_lats[11]

◆ _line_num

unsigned int ossimplugins::GeolocationGrid::_line_num

line_num

Definition at line 208 of file GeolocationGrid.h.

Referenced by get_line_num(), ossimplugins::operator<<(), operator=(), and ossimplugins::operator>>().

◆ _longs

int ossimplugins::GeolocationGrid::_longs[11]

◆ _num_lines

unsigned int ossimplugins::GeolocationGrid::_num_lines

num_lines

Definition at line 212 of file GeolocationGrid.h.

Referenced by get_num_lines(), ossimplugins::operator<<(), operator=(), and ossimplugins::operator>>().

◆ _samp_numbers

unsigned int ossimplugins::GeolocationGrid::_samp_numbers[11]

◆ _slant_range_times

float ossimplugins::GeolocationGrid::_slant_range_times[11]

◆ _sub_sat_track

float ossimplugins::GeolocationGrid::_sub_sat_track

sub_sat_track

Definition at line 216 of file GeolocationGrid.h.

Referenced by get_sub_sat_track(), ossimplugins::operator<<(), operator=(), and ossimplugins::operator>>().


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