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