OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ErsSarFileDescriptor.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 
15 namespace ossimplugins
16 {
17 
19 {
20 }
21 
23 {
24 }
25 
27 {
28  os << "ascii_flag:" << data._ascii_flag.c_str() << std::endl;
29  os << "format_doc:" << data._format_doc.c_str() << std::endl;
30  os << "format_ver:" << data._format_ver.c_str() << std::endl;
31  os << "design_rev:" << data._design_rev.c_str() << std::endl;
32  os << "software_id:" << data._software_id.c_str() << std::endl;
33  os << "file_num:" << data._file_num << std::endl;
34  os << "file_name:" << data._file_name.c_str() << std::endl;
35  os << "rec_seq:" << data._rec_seq.c_str() << std::endl;
36  os << "seq_loc:" << data._seq_loc << std::endl;
37  os << "seq_len:" << data._seq_len << std::endl;
38  os << "rec_code:" << data._rec_code.c_str() << std::endl;
39  os << "code_loc:" << data._code_loc << std::endl;
40  os << "code_len:" << data._code_len << std::endl;
41  os << "rec_len:" << data._rec_len.c_str() << std::endl;
42  os << "rlen_loc:" << data._rlen_loc << std::endl;
43  os << "rlen_len:" << data._rlen_len << std::endl;
44  os << "n_dataset:" << data._n_dataset << std::endl;
45  os << "l_dataset:" << data._l_dataset << std::endl;
46  os << "n_map_proj:" << data._n_map_proj << std::endl;
47  os << "l_map_proj:" << data._l_map_proj << std::endl;
48  os << "n_plat_pos:" << data._n_plat_pos << std::endl;
49  os << "l_plat_pos:" << data._l_plat_pos << std::endl;
50  os << "n_att_data:" << data._n_att_data << std::endl;
51  os << "l_att_data:" << data._l_att_data << std::endl;
52  os << "n_radi_data:" << data._n_radi_data << std::endl;
53  os << "l_radi_data:" << data._l_radi_data << std::endl;
54  os << "n_radi_comp:" << data._n_radi_comp << std::endl;
55  os << "l_radi_comp:" << data._l_radi_comp << std::endl;
56  os << "n_qual_sum:" << data._n_qual_sum << std::endl;
57  os << "l_qual_sum:" << data._l_qual_sum << std::endl;
58  os << "n_data_his:" << data._n_data_his << std::endl;
59  os << "l_data_his:" << data._l_data_his << std::endl;
60  os << "n_rang_spec:" << data._n_rang_spec << std::endl;
61  os << "l_rang_spec:" << data._l_rang_spec << std::endl;
62  os << "n_dem_desc:" << data._n_dem_desc << std::endl;
63  os << "l_dem_desc:" << data._l_dem_desc << std::endl;
64  os << "n_radar_par:" << data._n_radar_par << std::endl;
65  os << "l_radar_par:" << data._l_radar_par << std::endl;
66  os << "n_anno_data:" << data._n_anno_data << std::endl;
67  os << "l_anno_data:" << data._l_anno_data << std::endl;
68  os << "n_det_proc:" << data._n_det_proc << std::endl;
69  os << "l_det_proc:" << data._l_det_proc << std::endl;
70  os << "n_cal:" << data._n_cal << std::endl;
71  os << "l_cal:" << data._l_cal << std::endl;
72  os << "n_gcp:" << data._n_gcp << std::endl;
73  os << "l_gcp:" << data._l_gcp << std::endl;
74  os << "n_fac_data:" << data._n_fac_data << std::endl;
75  os << "l_fac_data:" << data._l_fac_data << std::endl;
76  return os;
77 }
78 
80 {
81  char buf2[3];
82  buf2[2] = '\0';
83  char buf12[13];
84  buf12[12] = '\0';
85  char buf16[17];
86  buf16[16] = '\0';
87  char buf4[5];
88  buf4[4] = '\0';
89  char buf6[7];
90  buf6[6] = '\0';
91  char buf8[9];
92  buf8[8] = '\0';
93  char buf64[65];
94  buf64[64] = '\0';
95 
96  char buf60[61];
97  buf60[60] = '\0';
98 
99  char buf288[289];
100  buf288[288] = '\0';
101 
102  is.read(buf2, 2);
103  data._ascii_flag = buf2;
104 
105  is.read(buf2, 2);
106 
107  is.read(buf12, 12);
108  data._format_doc = buf12;
109 
110  is.read(buf2, 2);
111  data._format_ver = buf2;
112 
113  is.read(buf2, 2);
114  data._design_rev = buf2;
115 
116  is.read(buf12, 12);
117  data._software_id = buf12;
118 
119  is.read(buf4, 4);
120  data._file_num = atoi(buf4);
121 
122  is.read(buf16, 16);
123  data._file_name = buf16;
124 
125  is.read(buf4, 4);
126  data._rec_seq = buf4;
127 
128  is.read(buf8, 8);
129  data._seq_loc = atoi(buf8);
130 
131  is.read(buf4, 4);
132  data._seq_len = atoi(buf4);
133 
134  is.read(buf4, 4);
135  data._rec_code = buf4;
136 
137  is.read(buf8, 8);
138  data._code_loc = atoi(buf8);
139 
140  is.read(buf4, 4);
141  data._code_len = atoi(buf4);
142 
143  is.read(buf4, 4);
144  data._rec_len = buf4;
145 
146  is.read(buf8, 8);
147  data._rlen_loc = atoi(buf8);
148 
149  is.read(buf4, 4);
150  data._rlen_len = atoi(buf4);
151 
152  is.read(buf4, 4);
153 
154  is.read(buf64, 64);
155 
156  is.read(buf6, 6);
157  data._n_dataset = atoi(buf6);
158 
159  is.read(buf6, 6);
160  data._l_dataset = atoi(buf6);
161 
162  is.read(buf6, 6);
163  data._n_map_proj = atoi(buf6);
164 
165  is.read(buf6, 6);
166  data._l_map_proj = atoi(buf6);
167 
168  is.read(buf6, 6);
169  data._n_plat_pos = atoi(buf6);
170  is.read(buf6, 6);
171  data._l_plat_pos = atoi(buf6);
172  is.read(buf6, 6);
173  data._n_att_data = atoi(buf6);
174  is.read(buf6, 6);
175  data._l_att_data = atoi(buf6);
176  is.read(buf6, 6);
177  data._n_radi_data = atoi(buf6);
178  is.read(buf6, 6);
179  data._l_radi_data = atoi(buf6);
180  is.read(buf6, 6);
181  data._n_radi_comp = atoi(buf6);
182  is.read(buf6, 6);
183  data._l_radi_comp = atoi(buf6);
184  is.read(buf6, 6);
185  data._n_qual_sum = atoi(buf6);
186  is.read(buf6, 6);
187  data._l_qual_sum = atoi(buf6);
188  is.read(buf6, 6);
189  data._n_data_his = atoi(buf6);
190  is.read(buf6, 6);
191  data._l_data_his = atoi(buf6);
192 
193 
194 
195  is.read(buf6, 6);
196  data._n_rang_spec = atoi(buf6);
197  is.read(buf6, 6);
198  data._l_rang_spec = atoi(buf6);
199  is.read(buf6, 6);
200  data._n_dem_desc = atoi(buf6);
201  is.read(buf6, 6);
202  data._l_dem_desc = atoi(buf6);
203  is.read(buf6, 6);
204  data._n_radar_par = atoi(buf6);
205  is.read(buf6, 6);
206  data._l_radar_par = atoi(buf6);
207  is.read(buf6, 6);
208  data._n_anno_data = atoi(buf6);
209  is.read(buf6, 6);
210  data._l_anno_data = atoi(buf6);
211  is.read(buf6, 6);
212  data._n_det_proc = atoi(buf6);
213  is.read(buf6, 6);
214  data._l_det_proc = atoi(buf6);
215  is.read(buf6, 6);
216  data._n_cal = atoi(buf6);
217  is.read(buf6, 6);
218  data._l_cal = atoi(buf6);
219  is.read(buf6, 6);
220  data._n_gcp = atoi(buf6);
221  is.read(buf6, 6);
222  data._l_gcp = atoi(buf6);
223  is.read(buf60, 60);
224  is.read(buf6, 6);
225  data._n_fac_data = atoi(buf6);
226  is.read(buf6, 6);
227  data._l_fac_data = atoi(buf6);
228  is.read(buf288, 288);
229  return is;
230 }
231 
233  ErsSarRecord(rhs),
234  _ascii_flag(rhs._ascii_flag),
235  _format_doc(rhs._format_doc),
236  _format_ver(rhs._format_ver),
237  _design_rev(rhs._design_rev),
238  _software_id(rhs._software_id),
239  _file_num(rhs._file_num),
240  _file_name(rhs._file_name),
241  _rec_seq(rhs._rec_seq),
242  _seq_loc(rhs._seq_loc),
243  _seq_len(rhs._seq_len),
244  _rec_code(rhs._rec_code),
245  _code_loc(rhs._code_loc),
246  _code_len(rhs._code_len),
247  _rec_len(rhs._rec_len),
248  _rlen_loc(rhs._rlen_loc),
249  _rlen_len(rhs._rlen_len),
250  _n_dataset(rhs._n_dataset),
251  _l_dataset(rhs._l_dataset),
252  _n_map_proj(rhs._n_map_proj),
253  _l_map_proj(rhs._l_map_proj),
254  _n_plat_pos(rhs._n_plat_pos),
255  _l_plat_pos(rhs._l_plat_pos),
256  _n_att_data(rhs._n_att_data),
257  _l_att_data(rhs._l_att_data),
258  _n_radi_data(rhs._n_radi_data),
259  _l_radi_data(rhs._l_radi_data),
260  _n_radi_comp(rhs._n_radi_comp),
261  _l_radi_comp(rhs._l_radi_comp),
262  _n_qual_sum(rhs._n_qual_sum),
263  _l_qual_sum(rhs._l_qual_sum),
264  _n_data_his(rhs._n_data_his),
265  _l_data_his(rhs._l_data_his),
266  _n_rang_spec(rhs._n_rang_spec),
267  _l_rang_spec(rhs._l_rang_spec),
268  _n_dem_desc(rhs._n_dem_desc),
269  _l_dem_desc(rhs._l_dem_desc),
270  _n_radar_par(rhs._n_radar_par),
271  _l_radar_par(rhs._l_radar_par),
272  _n_anno_data(rhs._n_anno_data),
273  _l_anno_data(rhs._l_anno_data),
274  _n_det_proc(rhs._n_det_proc),
275  _l_det_proc(rhs._l_det_proc),
276  _n_cal(rhs._n_cal),
277  _l_cal(rhs._l_cal),
278  _n_gcp(rhs._n_gcp),
279  _l_gcp(rhs._l_gcp),
280  _n_fac_data(rhs._n_fac_data),
281  _l_fac_data(rhs._l_fac_data)
282 {
283 }
284 
286 {
287  _ascii_flag = rhs._ascii_flag;
288  _format_doc = rhs._format_doc;
289  _format_ver = rhs._format_ver;
290  _design_rev = rhs._design_rev;
292  _file_num = rhs._file_num;
293  _file_name = rhs._file_name;
294  _rec_seq = rhs._rec_seq;
295  _seq_loc = rhs._seq_loc;
296  _seq_len = rhs._seq_len;
297  _rec_code = rhs._rec_code;
298  _code_loc = rhs._code_loc;
299  _code_len = rhs._code_len;
300  _rec_len = rhs._rec_len;
301  _rlen_loc = rhs._rlen_loc;
302  _rlen_len = rhs._rlen_len;
303  _n_dataset = rhs._n_dataset;
304  _l_dataset = rhs._l_dataset;
305  _n_map_proj = rhs._n_map_proj;
306  _l_map_proj = rhs._l_map_proj;
307  _n_plat_pos = rhs._n_plat_pos;
308  _l_plat_pos = rhs._l_plat_pos;
309  _n_att_data = rhs._n_att_data;
310  _l_att_data = rhs._l_att_data;
315  _n_qual_sum = rhs._n_qual_sum ;
316  _l_qual_sum = rhs._l_qual_sum;
317  _n_data_his = rhs._n_data_his;
318  _l_data_his = rhs._l_data_his;
321  _n_dem_desc = rhs._n_dem_desc;
322  _l_dem_desc = rhs._l_dem_desc;
327  _n_det_proc = rhs._n_det_proc;
328  _l_det_proc = rhs._l_det_proc;
329  _n_cal = rhs._n_cal;
330  _l_cal = rhs._l_cal;
331  _n_gcp = rhs._n_gcp;
332  _l_gcp = rhs._l_gcp;
333  _n_fac_data = rhs._n_fac_data;
334  _l_fac_data = rhs._l_fac_data;
335  return *this;
336 }
337 }
int _n_cal
Number of calibration records.
int _n_dem_desc
Number of DEM descriptor records.
int _l_data_his
Data histogram record length, bytes.
int _l_dem_desc
DEM desc record length, bytes.
int _l_gcp
GCP record length, bytes.
int _l_anno_data
Annotation data record length, bytes.
int _n_fac_data
Number of facility data records.
std::string _design_rev
Format doc revision.
int _l_radi_comp
Radiometric compensation record length, bytes.
std::string _rec_seq
Record sequence/location flag.
int _l_cal
Calibration record length, bytes.
int _n_radi_comp
Number of radiometric compensation records.
int _l_map_proj
Map projection record length, bytes.
int _l_plat_pos
Platform position record length, bytes.
int _l_att_data
Attitude data record length, bytes.
int _n_det_proc
Number of processing parameter records.
std::string _rec_code
Record code/location flag.
int _n_anno_data
Number of annotation data records.
int _n_qual_sum
Number of data quality summary records.
std::string _format_ver
Format doc version.
int _n_radi_data
Number of radiometric data records.
int _l_qual_sum
Data quality summary record length, bytes.
int _n_radar_par
Number of RADAR par records.
std::ostream & operator<<(std::ostream &os, const AlosPalsarData &data)
std::string _rec_len
Record length/location flag.
int _l_radi_data
Radiometric data record length, bytes.
int _l_rang_spec
Range spectra record length, bytes.
std::string _software_id
Software identifier.
int _n_map_proj
Number of map proj records.
int _l_fac_data
Fac data record length, bytes.
This class is the base class of all the record classes.
Definition: ErsSarRecord.h:27
std::istream & operator>>(std::istream &is, AlosPalsarData &data)
int _n_att_data
Number of attitude data records.
This class is able to read the SAR leader file descriptor record of the leader file.
int _l_radar_par
RADAR par record length, bytes.
int _seq_loc
Sequence number location.
int _l_det_proc
Processing parameter record length, bytes.
std::basic_istream< char > istream
Base class for char input streams.
Definition: ossimIosFwd.h:20
int _n_plat_pos
Number of platform position records.
int _n_data_his
Number of data histogram records.
int _rlen_loc
Record lenght location.
int _n_dataset
Number of dataset summ records.
ErsSarFileDescriptor & operator=(const ErsSarFileDescriptor &rhs)
Copy operator.
int _seq_len
Sequence number lenght.
std::string _format_doc
Format control documentation.
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23
int _l_dataset
Data set summary record length, bytes.
int _n_rang_spec
Number of range spectra records.