OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ProcessedDataRecord.cpp
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 //
3 // "Copyright Centre National d'Etudes Spatiales"
4 //
5 // License: LGPL
6 //
7 // See LICENSE.txt file in the top level directory for more details.
8 //
9 //----------------------------------------------------------------------------
10 // $Id$
11 
13 
14 namespace ossimplugins
15 {
16 
18  {
19  }
20 
22  {
23  }
24 
26  {
27  os<<"line_num:"<<data._line_num<<std::endl;
28  os<<"rec_num:"<<data._rec_num<<std::endl;
29  os<<"n_left_pixel:"<<data._n_left_pixel<<std::endl;
30  os<<"n_data_pixel:"<<data._n_data_pixel<<std::endl;
31  os<<"n_right_pixel:"<<data._n_right_pixel<<std::endl;
32  os<<"sensor_updf:"<<data._sensor_updf<<std::endl;
33  os<<"acq_year:"<<data._acq_year<<std::endl;
34  os<<"acq_day:"<<data._acq_day<<std::endl;
35  os<<"acq_msec:"<<data._acq_msec<<std::endl;
36  os<<"sar_chan_ind:"<<data._sar_chan_ind<<std::endl;
37  os<<"sar_chan_code:"<<data._sar_chan_code<<std::endl;
38  os<<"tran_polar:"<<data._tran_polar<<std::endl;
39  os<<"recv_polar:"<<data._recv_polar<<std::endl;
40  os<<"prf:"<<data._prf<<std::endl;
41  os<<"sr_first:"<<data._sr_first<<std::endl;
42  os<<"sr_last:"<<data._sr_last<<std::endl;
43  os<<"fdc_first:"<<data._fdc_first<<std::endl;
44  os<<"fdc_mid:"<<data._fdc_mid<<std::endl;
45  os<<"fdc_last:"<<data._fdc_last<<std::endl;
46  os<<"ka_first:"<<data._ka_first<<std::endl;
47  os<<"ka_mid:"<<data._ka_mid<<std::endl;
48  os<<"ka_last:"<<data._ka_last<<std::endl;
49  os<<"nadir_ang:"<<data._nadir_ang<<std::endl;
50  os<<"squint_ang:"<<data._squint_ang<<std::endl;
51  os<<"geo_updf:"<<data._geo_updf<<std::endl;
52  os<<"lat_first:"<<data._lat_first<<std::endl;
53  os<<"lat_mid:"<<data._lat_mid<<std::endl;
54  os<<"lat_last:"<<data._lat_last<<std::endl;
55  os<<"lon_first:"<<data._lon_first<<std::endl;
56  os<<"lon_mid:"<<data._lon_mid<<std::endl;
57  os<<"lon_last:"<<data._lon_last<<std::endl;
58  os<<"north_first:"<<data._north_first<<std::endl;
59  os<<"north_last:"<<data._north_last<<std::endl;
60  os<<"east_first:"<<data._east_first<<std::endl;
61  os<<"east_last:"<<data._east_last<<std::endl;
62  os<<"heading:"<<data._heading<<std::endl;
63 
64  return os;
65  }
66 
67  void SwitchEndian(int& value)
68  {
69  char buffer[4];
70  char res[4];
71 
72  memcpy(buffer,&value,4);
73  res[0] = buffer[3];
74  res[1] = buffer[2];
75  res[2] = buffer[1];
76  res[3] = buffer[0];
77 
78  memcpy(&value,res,4);
79  }
80 
82  {
83  char buf[193];
84  buf[192] = '\0';
85 
86  is.read((char*)&(data._line_num),4);
87  data.SwitchEndian(data._line_num);
88 
89  is.read((char*)&(data._rec_num),4);
90  data.SwitchEndian(data._rec_num);
91 
92  is.read((char*)&(data._n_left_pixel),4);
93  data.SwitchEndian(data._n_left_pixel);
94 
95  is.read((char*)&(data._n_data_pixel),4);
96  data.SwitchEndian(data._n_data_pixel);
97 
98  is.read((char*)&(data._n_right_pixel),4);
99  data.SwitchEndian(data._n_right_pixel);
100 
101  is.read((char*)&(data._sensor_updf),4);
102  data.SwitchEndian(data._sensor_updf);
103 
104  is.read((char*)&(data._acq_year),4);
105  data.SwitchEndian(data._acq_year);
106 
107  is.read((char*)&(data._acq_day),4);
108  data.SwitchEndian(data._acq_day);
109 
110  is.read((char*)&(data._acq_msec),4);
111  data.SwitchEndian(data._acq_msec);
112 
113  is.read((char*)&(data._sar_chan_ind),2);
114  data.SwitchEndian(data._sar_chan_ind);
115 
116  is.read((char*)&(data._sar_chan_code),2);
117  data.SwitchEndian(data._sar_chan_code);
118 
119  is.read((char*)&(data._tran_polar),2);
120  data.SwitchEndian(data._tran_polar );
121 
122  is.read((char*)&(data._recv_polar),2);
123  data.SwitchEndian(data._recv_polar);
124 
125  is.read((char*)&(data._prf),4);
126  data.SwitchEndian(data._prf );
127 
128  is.read(buf,4);
129 
130  is.read((char*)&(data._sr_first),4);
131  data.SwitchEndian(data._sr_first);
132 
133  is.read((char*)&(data._sr_mid),4);
134  data.SwitchEndian(data._sr_mid);
135 
136  is.read((char*)&(data._sr_last),4);
137  data.SwitchEndian(data._sr_last);
138 
139  is.read((char*)&(data._fdc_first),4);
140  data.SwitchEndian(data._fdc_first);
141 
142  is.read((char*)&(data._fdc_mid),4);
143  data.SwitchEndian(data._fdc_mid);
144 
145  is.read((char*)&(data._fdc_last),4);
146  data.SwitchEndian(data._fdc_last);
147 
148  is.read((char*)&(data._ka_first),4);
149  data.SwitchEndian(data._ka_first);
150 
151  is.read((char*)&(data._ka_mid),4);
152  data.SwitchEndian(data._ka_mid);
153 
154  is.read((char*)&(data._ka_last),4);
155  data.SwitchEndian(data._ka_last);
156 
157  is.read((char*)&(data._nadir_ang),4);
158  data.SwitchEndian(data._nadir_ang);
159 
160  is.read((char*)&(data._squint_ang),4);
161  data.SwitchEndian(data._squint_ang);
162 
163  is.read(buf,4);
164  is.read(buf,16);
165 
166  is.read((char*)&(data._geo_updf),4);
167  data.SwitchEndian(data._geo_updf);
168 
169  is.read((char*)&(data._lat_first),4);
170  data.SwitchEndian(data._lat_first);
171 
172  is.read((char*)&(data._lat_mid),4);
173  data.SwitchEndian(data._lat_mid);
174 
175  is.read((char*)&(data._lat_last),4);
176  data.SwitchEndian(data._lat_last);
177 
178  is.read((char*)&(data._lon_first),4);
179  data.SwitchEndian(data._lon_first);
180 
181  is.read((char*)&(data._lon_mid),4);
182  data.SwitchEndian(data._lon_mid);
183 
184  is.read((char*)&(data._lon_last),4);
185  data.SwitchEndian(data._lon_last);
186 
187  is.read((char*)&(data._north_first),4);
188  data.SwitchEndian(data._north_first);
189 
190  is.read(buf,4);
191 
192  is.read((char*)&(data._north_last),4);
193  data.SwitchEndian(data._north_last);
194 
195  is.read((char*)&(data._east_first),4);
196  data.SwitchEndian(data._east_first);
197 
198  is.read(buf,4);
199 
200  is.read((char*)&(data._east_last),4);
201  data.SwitchEndian(data._east_last);
202 
203  is.read((char*)&(data._heading),4);
204  data.SwitchEndian(data._heading);
205 
206  is.read(buf,8);
207 
208  return is;
209  }
210 
212  RadarSatRecord(rhs)
213  {
214 
215 
216  }
217 
219  {
220  return *this;
221  }
222 }
void SwitchEndian(int &value)
int _fdc_mid
Mid pixel Doppler centroid, Hz
int _n_right_pixel
Right fill pixel count
int _recv_polar
Received polarization
int _east_first
Easting of first pixel, m.
int _lon_first
First pixel longitude, 10e-6 deg.
void SwitchEndian(T &value)
This function switches the LSB value and the MSB value of the parameter.
int _sensor_updf
Sensor parameter update flag
int _heading
Line heading, 10e-6 deg.
int _geo_updf
Geographic ref parameter update flag
int _fdc_last
Last pixel Doppler centroid, Hz
int _lat_first
First pixel latitude, 10e-6 deg
This class is the base class of all the record classes.
int _squint_ang
Azimuth squint angle, 10e-6 deg
int _lon_last
Last-pixel longitude, 10e-6 deg.
std::ostream & operator<<(std::ostream &os, const AlosPalsarData &data)
int _lon_mid
Mid-pixel longitude, 10e-6 deg
int _sar_chan_ind
SAR channel indicator
int _sr_mid
Slant range to mid-pixel, m
This class is able to read an Processed Data Record.
int _north_last
Northing of last pixel, m.
int _fdc_first
First pixel Doppler centroid, Hz
int _ka_mid
Mid pixel azimuth FM rate, Hz
int _line_num
Image data line number.
std::istream & operator>>(std::istream &is, AlosPalsarData &data)
int _lat_mid
Mid-pixel latitude, 10e-6 deg
int _north_first
Northing of first pixel, m
ProcessedDataRecord & operator=(const ProcessedDataRecord &rhs)
Copy operator.
int _ka_last
Last pixel azimuth FM rate, Hz.
std::basic_istream< char > istream
Base class for char input streams.
Definition: ossimIosFwd.h:20
int _nadir_ang
Nadir look angle, 10e-6 deg
int _tran_polar
Transmitted polarization
int _ka_first
First pixel azimuth FM rate, Hz
int _sr_first
Slant range to first pixel, m
int _sr_last
Slant range to last pixel, m
int _rec_num
Image data record index
int _n_left_pixel
Left fill pixel count
int _lat_last
Last-pixel latitude, 10e-6 deg.
int _east_last
Easting of last pixel, m.
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23