OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
sph.h
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 #ifndef sph_h
13 #define sph_h
14 
15 #include <iostream>
16 #include <vector>
18 #include <EnvisatAsar/mph.h>
19 #include <EnvisatAsar/dsd.h>
20 
21 namespace ossimplugins
22 {
27 class sph : public EnvisatAsarRecord
28 {
29 public:
33  sph();
34 
38  sph(const mph& data);
42  virtual ~sph();
43 
47  friend std::ostream& operator<<(std::ostream& os, const sph& data);
48 
52  friend std::istream& operator>>(std::istream& is, sph& data);
53 
57  sph(const sph& rhs);
58 
62  sph& operator=(const sph& rhs);
63 
68  {
69  return new sph();
70  };
71 
76  {
77  return new sph(*this);
78  };
79 
83  void Read(std::istream& is)
84  {
85  is>>*this;
86  };
87 
91  void Write(std::ostream& os)
92  {
93  os<<*this;
94  };
95 
99  std::string get_sph_desc_title()
100  {
101  return _sph_desc_title;
102  };
106  std::string get_sph_desc()
107  {
108  return _sph_desc;
109  };
114  {
115  return _strip_cont_ind_title;
116  };
120  std::string get_strip_cont_ind()
121  {
122  return _strip_cont_ind;
123  };
127  std::string get_slice_pos_title()
128  {
129  return _slice_pos_title;
130  };
134  std::string get_slice_position()
135  {
136  return _slice_position;
137  };
141  std::string get_num_slices_title()
142  {
143  return _num_slices_title;
144  };
148  std::string get_num_slices()
149  {
150  return _num_slices;
151  };
156  {
157  return _first_line_time_title;
158  };
162  std::string get_first_line_time()
163  {
164  return _first_line_time;
165  };
170  {
171  return _last_line_time_title;
172  };
176  std::string get_last_line_time()
177  {
178  return _last_line_time;
179  };
184  {
185  return _first_near_lat_title;
186  };
190  std::string get_first_near_lat()
191  {
192  return _first_near_lat;
193  };
198  {
199  return _first_near_lat_units;
200  };
205  {
206  return _first_near_long_title;
207  };
211  std::string get_first_near_long()
212  {
213  return _first_near_long;
214  };
219  {
220  return _first_near_long_units;
221  };
226  {
227  return _first_mid_lat_title;
228  };
232  std::string get_first_mid_lat()
233  {
234  return _first_mid_lat;
235  };
240  {
241  return _first_mid_lat_units;
242  };
247  {
248  return _first_mid_long_title;
249  };
253  std::string get_first_mid_long()
254  {
255  return _first_mid_long;
256  };
261  {
262  return _first_mid_long_units;
263  };
268  {
269  return _first_far_lat_title;
270  };
274  std::string get_first_far_lat()
275  {
276  return _first_far_lat;
277  };
282  {
283  return _first_far_lat_units;
284  };
289  {
290  return _first_far_long_title;
291  };
295  std::string get_first_far_long()
296  {
297  return _first_far_long;
298  };
303  {
304  return _first_far_long_units;
305  };
310  {
311  return _last_near_lat_title;
312  };
316  std::string get_last_near_lat()
317  {
318  return _last_near_lat;
319  };
324  {
325  return _last_near_lat_units;
326  };
331  {
332  return _last_near_long_title;
333  };
337  std::string get_last_near_long()
338  {
339  return _last_near_long;
340  };
345  {
346  return _last_near_long_units;
347  };
352  {
353  return _last_mid_lat_title;
354  };
358  std::string get_last_mid_lat()
359  {
360  return _last_mid_lat;
361  };
366  {
367  return _last_mid_lat_units;
368  };
373  {
374  return _last_mid_long_title;
375  };
379  std::string get_last_mid_long()
380  {
381  return _last_mid_long;
382  };
387  {
388  return _last_mid_long_units;
389  };
394  {
395  return _last_far_lat_title;
396  };
400  std::string get_last_far_lat()
401  {
402  return _last_far_lat;
403  };
408  {
409  return _last_far_lat_units;
410  };
415  {
416  return _last_far_long_title;
417  };
421  std::string get_last_far_long()
422  {
423  return _last_far_long;
424  };
429  {
430  return _last_far_long_units;
431  };
435  std::string get_swath_title()
436  {
437  return _swath_title;
438  };
442  std::string get_swath()
443  {
444  return _swath;
445  };
449  std::string get_pass_title()
450  {
451  return _pass_title;
452  };
456  std::string get_pass()
457  {
458  return _pass;
459  };
463  std::string get_sample_type_title()
464  {
465  return _sample_type_title;
466  };
470  std::string get_sample_type()
471  {
472  return _sample_type;
473  };
477  std::string get_algo_title()
478  {
479  return _algo_title;
480  };
484  std::string get_algorithm()
485  {
486  return _algorithm;
487  };
492  {
494  };
498  std::string get_mds1_tx_rx_polar()
499  {
500  return _mds1_tx_rx_polar;
501  };
506  {
508  };
512  std::string get_mds2_tx_rx_polar()
513  {
514  return _mds2_tx_rx_polar;
515  };
519  std::string get_compression_title()
520  {
521  return _compression_title;
522  };
526  std::string get_compression()
527  {
528  return _compression;
529  };
534  {
535  return _azimut_looks_title;
536  };
540  std::string get_azimut_looks()
541  {
542  return _azimut_looks;
543  };
547  std::string get_range_looks_title()
548  {
549  return _range_looks_title;
550  };
554  std::string get_range_looks()
555  {
556  return _range_looks;
557  };
562  {
563  return _range_spacing_title;
564  };
568  std::string get_range_spacing()
569  {
570  return _range_spacing;
571  };
576  {
577  return _range_spacing_unit;
578  };
583  {
584  return _azimut_spacing_title;
585  };
589  std::string get_azimut_spacing()
590  {
591  return _azimut_spacing;
592  };
597  {
598  return _azimut_spacing_unit;
599  };
604  {
606  };
611  {
612  return _line_time_interval;
613  };
618  {
620  };
624  std::string get_line_length_title()
625  {
626  return _line_length_title;
627  };
631  std::string get_line_length()
632  {
633  return _line_length;
634  };
638  std::string get_line_length_units()
639  {
640  return _line_length_units;
641  };
645  std::string get_data_type_title()
646  {
647  return _data_type_title;
648  };
652  std::string get_data_type()
653  {
654  return _data_type;
655  };
659  std::vector<dsd> get_dsd_vector()
660  {
661  return _dsd_vector;
662  }
663 
667  bool update_sph_from_mph( mph& mph_rec)
668  {
669  _num_dsd = mph_rec._num_dsd;
670  _size_dsd = mph_rec._dsd_size;
671 
672  return 1;
673  };
674 
675 
676 protected:
680  long _num_dsd;
681 
685  long _size_dsd;
686 
690  std::string _sph_desc_title;
694  std::string _sph_desc;
702  std::string _strip_cont_ind;
706  std::string _slice_pos_title;
710  std::string _slice_position;
714  std::string _num_slices_title;
718  std::string _num_slices;
726  std::string _first_line_time;
734  std::string _last_line_time;
742  std::string _first_near_lat;
754  std::string _first_near_long;
762  std::string _first_mid_lat_title;
766  std::string _first_mid_lat;
770  std::string _first_mid_lat_units;
778  std::string _first_mid_long;
786  std::string _first_far_lat_title;
790  std::string _first_far_lat;
794  std::string _first_far_lat_units;
802  std::string _first_far_long;
810  std::string _last_near_lat_title;
814  std::string _last_near_lat;
818  std::string _last_near_lat_units;
826  std::string _last_near_long;
834  std::string _last_mid_lat_title;
838  std::string _last_mid_lat;
842  std::string _last_mid_lat_units;
846  std::string _last_mid_long_title;
850  std::string _last_mid_long;
854  std::string _last_mid_long_units;
858  std::string _last_far_lat_title;
862  std::string _last_far_lat;
866  std::string _last_far_lat_units;
870  std::string _last_far_long_title;
874  std::string _last_far_long;
878  std::string _last_far_long_units;
882  std::string _swath_title;
886  std::string _swath;
890  std::string _pass_title;
894  std::string _pass;
898  std::string _sample_type_title;
902  std::string _sample_type;
906  std::string _algo_title;
910  std::string _algorithm;
918  std::string _mds1_tx_rx_polar;
926  std::string _mds2_tx_rx_polar;
930  std::string _compression_title;
934  std::string _compression;
938  std::string _azimut_looks_title;
942  std::string _azimut_looks;
946  std::string _range_looks_title;
950  std::string _range_looks;
954  std::string _range_spacing_title;
958  std::string _range_spacing;
962  std::string _range_spacing_unit;
970  std::string _azimut_spacing;
974  std::string _azimut_spacing_unit;
982  std::string _line_time_interval;
990  std::string _line_length_title;
994  std::string _line_length;
998  std::string _line_length_units;
1002  std::string _data_type_title;
1006  std::string _data_type;
1010  std::vector<dsd> _dsd_vector;
1011 
1012 private:
1013 
1014 };
1015 }
1016 #endif
std::string get_first_near_lat_units()
first_near_lat_units
Definition: sph.h:197
std::string get_last_line_time_title()
last_line_time_title
Definition: sph.h:169
friend std::ostream & operator<<(std::ostream &os, const sph &data)
This function write the sph in a stream.
Definition: sph.cpp:34
std::string get_first_mid_lat()
first_mid_lat
Definition: sph.h:232
std::string _mds2_tx_rx_polar
mds2_tx_rx_polar
Definition: sph.h:926
std::vector< dsd > _dsd_vector
DSD records
Definition: sph.h:1010
std::string get_mds1_tx_rx_polar()
mds1_tx_rx_polar
Definition: sph.h:498
This class is able to read the SAR sph record of the ASAR file.
Definition: sph.h:27
std::string _first_mid_lat_units
first_mid_lat_units
Definition: sph.h:770
std::string get_azimut_looks()
azimut_looks
Definition: sph.h:540
std::string _last_far_long_title
last_far_long_title
Definition: sph.h:870
std::string get_last_far_lat_units()
last_far_lat_units
Definition: sph.h:407
std::string get_compression()
compression
Definition: sph.h:526
std::string _last_line_time
last_line_time
Definition: sph.h:734
std::string _first_mid_long_title
first_mid_long_title
Definition: sph.h:774
std::string _mds1_tx_rx_polar_title
mds1_tx_rx_polar_title
Definition: sph.h:914
std::string _first_mid_lat
first_mid_lat
Definition: sph.h:766
std::string get_pass_title()
pass_title
Definition: sph.h:449
std::string get_first_far_lat_units()
first_far_lat_units
Definition: sph.h:281
std::string _azimut_spacing_unit
azimut_spacing_unit
Definition: sph.h:974
std::string _first_mid_long_units
first_mid_long_units
Definition: sph.h:782
std::string _azimut_looks_title
azimut_looks_title
Definition: sph.h:938
std::string get_last_far_lat()
last_far_lat
Definition: sph.h:400
std::string get_azimut_looks_title()
azimut_looks_title
Definition: sph.h:533
std::string get_first_mid_lat_title()
first_mid_lat_title
Definition: sph.h:225
std::string _mds1_tx_rx_polar
mds1_tx_rx_polar
Definition: sph.h:918
std::string _last_far_long
last_far_long
Definition: sph.h:874
std::string _first_mid_long
first_mid_long
Definition: sph.h:778
std::string _line_length
line_length
Definition: sph.h:994
std::string get_first_mid_long()
first_mid_long
Definition: sph.h:253
std::string get_last_near_long_units()
last_near_long_units
Definition: sph.h:344
std::string get_line_time_interv_units()
line_time_interv_units
Definition: sph.h:617
std::string _first_far_long
first_far_long
Definition: sph.h:802
std::string get_first_mid_long_units()
first_mid_long_units
Definition: sph.h:260
std::string _num_slices_title
num_slices_title
Definition: sph.h:714
EnvisatAsarRecord * Clone()
This function is able to create a new instance of the class initialised with the data of the calling ...
Definition: sph.h:75
std::string _last_near_lat_units
last_near_lat_units
Definition: sph.h:818
std::string _sph_desc
sph_desc
Definition: sph.h:694
std::string _first_line_time_title
first_line_time_title
Definition: sph.h:722
std::string get_range_looks_title()
range_looks_title
Definition: sph.h:547
std::string get_first_mid_long_title()
first_mid_long_title
Definition: sph.h:246
std::string _strip_cont_ind_title
strip_cont_ind_title
Definition: sph.h:698
std::string _num_slices
num_slices
Definition: sph.h:718
std::string _first_near_long
first_near_long
Definition: sph.h:754
std::string get_azimut_spacing_title()
azimut_spacing_title
Definition: sph.h:582
std::string get_last_far_long()
last_far_long
Definition: sph.h:421
std::string get_first_near_long_units()
first_near_long_units
Definition: sph.h:218
std::string get_first_near_long_title()
first_near_long_title
Definition: sph.h:204
std::string _last_far_lat_units
last_far_lat_units
Definition: sph.h:866
std::string get_first_line_time_title()
first_line_time_title
Definition: sph.h:155
std::string _last_near_lat
last_near_lat
Definition: sph.h:814
std::string get_line_length_units()
line_length_units
Definition: sph.h:638
std::string get_range_looks()
range_looks
Definition: sph.h:554
std::string _last_mid_long_title
last_mid_long_title
Definition: sph.h:846
void Write(std::ostream &os)
Write the class to a stream.
Definition: sph.h:91
std::string get_pass()
pass
Definition: sph.h:456
std::string _last_near_long_title
last_near_long_title
Definition: sph.h:822
std::string get_algo_title()
algo_title
Definition: sph.h:477
std::string get_num_slices()
num_slices
Definition: sph.h:148
std::string get_compression_title()
compression_title
Definition: sph.h:519
std::string get_data_type()
data_type
Definition: sph.h:652
std::string _last_far_lat_title
last_far_lat_title
Definition: sph.h:858
std::string get_last_far_long_title()
last_far_long_title
Definition: sph.h:414
virtual ~sph()
Destructor.
Definition: sph.cpp:29
std::string get_sph_desc()
sph_desc
Definition: sph.h:106
std::string get_strip_cont_ind_title()
strip_cont_ind_title
Definition: sph.h:113
std::string _azimut_spacing_title
azimut_spacing_title
Definition: sph.h:966
std::string _algo_title
algo_title
Definition: sph.h:906
std::vector< dsd > get_dsd_vector()
data_type
Definition: sph.h:659
std::string _strip_cont_ind
strip_cont_ind
Definition: sph.h:702
std::string _last_mid_lat_title
last_mid_lat_title
Definition: sph.h:834
int _num_dsd
num_dsd
Definition: mph.h:961
std::string _range_spacing_title
range_spacing_title
Definition: sph.h:954
std::string _slice_position
slice_position
Definition: sph.h:710
std::string get_last_mid_lat()
last_mid_lat
Definition: sph.h:358
std::string _range_spacing_unit
range_spacing_unit
Definition: sph.h:962
std::string get_last_near_lat()
last_near_lat
Definition: sph.h:316
std::string _sample_type_title
sample_type_title
Definition: sph.h:898
std::string get_line_time_interval()
line_time_interval
Definition: sph.h:610
std::string _last_far_lat
last_far_lat
Definition: sph.h:862
std::string get_last_mid_long_title()
last_mid_long_title
Definition: sph.h:372
std::string _first_near_long_title
first_near_long_title
Definition: sph.h:750
std::string get_first_far_lat()
first_far_lat
Definition: sph.h:274
std::string _last_far_long_units
last_far_long_units
Definition: sph.h:878
std::string _first_far_lat
first_far_lat
Definition: sph.h:790
std::string get_range_spacing_unit()
range_spacing_unit
Definition: sph.h:575
std::string get_num_slices_title()
num_slices_title
Definition: sph.h:141
std::string _first_mid_lat_title
first_mid_lat_title
Definition: sph.h:762
std::string get_swath()
swath
Definition: sph.h:442
std::string get_last_mid_lat_units()
last_mid_lat_units
Definition: sph.h:365
std::string _last_mid_lat
last_mid_lat
Definition: sph.h:838
std::string _first_line_time
first_line_time
Definition: sph.h:726
std::string get_last_near_long_title()
last_near_long_title
Definition: sph.h:330
std::string _last_mid_long
last_mid_long
Definition: sph.h:850
std::string get_last_far_lat_title()
last_far_lat_title
Definition: sph.h:393
std::string _data_type_title
data_type_title
Definition: sph.h:1002
int _dsd_size
dsd_size
Definition: mph.h:969
std::string get_last_line_time()
last_line_time
Definition: sph.h:176
std::string _line_length_title
line_length_title
Definition: sph.h:990
std::string _first_near_long_units
first_near_long_units
Definition: sph.h:758
std::string get_slice_pos_title()
slice_pos_title
Definition: sph.h:127
std::string _slice_pos_title
slice_pos_title
Definition: sph.h:706
std::string _line_time_interval
line_time_interval
Definition: sph.h:982
std::string _first_near_lat
first_near_lat
Definition: sph.h:742
std::string _last_mid_long_units
last_mid_long_units
Definition: sph.h:854
std::string _last_mid_lat_units
last_mid_lat_units
Definition: sph.h:842
std::string get_range_spacing()
range_spacing
Definition: sph.h:568
std::string _range_looks_title
range_looks_title
Definition: sph.h:946
std::string get_first_far_lat_title()
first_far_lat_title
Definition: sph.h:267
std::string get_last_mid_lat_title()
last_mid_lat_title
Definition: sph.h:351
std::string get_first_mid_lat_units()
first_mid_lat_units
Definition: sph.h:239
std::string get_mds1_tx_rx_polar_title()
mds1_tx_rx_polar_title
Definition: sph.h:491
std::string get_azimut_spacing_unit()
azimut_spacing_unit
Definition: sph.h:596
This class is able to read the ASAR mph record of the leader file.
Definition: mph.h:25
long _num_dsd
Number of Data Set Descriptors (DSD)
Definition: sph.h:673
std::string get_mds2_tx_rx_polar()
mds2_tx_rx_polar
Definition: sph.h:512
std::string _last_near_lat_title
last_near_lat_title
Definition: sph.h:810
std::string get_first_line_time()
first_line_time
Definition: sph.h:162
std::string get_line_time_interval_title()
line_time_interval_title
Definition: sph.h:603
std::string get_last_far_long_units()
last_far_long_units
Definition: sph.h:428
std::string _pass_title
pass_title
Definition: sph.h:890
std::string get_first_near_lat_title()
first_near_lat_title
Definition: sph.h:183
std::string _swath
swath
Definition: sph.h:886
void Read(std::istream &is)
Read the class data from a stream.
Definition: sph.h:83
std::basic_istream< char > istream
Base class for char input streams.
Definition: ossimIosFwd.h:20
std::string _compression_title
compression_title
Definition: sph.h:930
std::string get_first_far_long()
first_far_long
Definition: sph.h:295
std::string _line_time_interval_title
line_time_interval_title
Definition: sph.h:978
std::string _range_looks
range_looks
Definition: sph.h:950
std::string _algorithm
algorithm
Definition: sph.h:910
std::string _range_spacing
range_spacing
Definition: sph.h:958
std::string _sph_desc_title
sph_desc_title
Definition: sph.h:690
std::string get_first_near_lat()
first_near_lat
Definition: sph.h:190
std::string get_sph_desc_title()
sph_desc_title
Definition: sph.h:99
std::string _mds2_tx_rx_polar_title
mds2_tx_rx_polar_title
Definition: sph.h:922
std::string _data_type
data_type
Definition: sph.h:1006
std::string get_data_type_title()
data_type_title
Definition: sph.h:645
std::string get_last_mid_long()
last_mid_long
Definition: sph.h:379
EnvisatAsarRecord * Instanciate()
This function is able to create a new instance of the class.
Definition: sph.h:67
This class is the base class of all the Envisat ASAR record classes.
std::string _last_near_long_units
last_near_long_units
Definition: sph.h:830
std::string get_line_length_title()
line_length_title
Definition: sph.h:624
std::string get_swath_title()
swath_title
Definition: sph.h:435
std::string get_last_near_lat_title()
last_near_lat_title
Definition: sph.h:309
std::string _first_far_lat_units
first_far_lat_units
Definition: sph.h:794
std::string _line_length_units
line_length_units
Definition: sph.h:998
std::string get_mds2_tx_rx_polar_title()
mds2_tx_rx_polar_title
Definition: sph.h:505
std::string get_strip_cont_ind()
strip_cont_ind
Definition: sph.h:120
long _size_dsd
Size of each Data Set Descriptors (DSD)
Definition: sph.h:685
std::string _first_near_lat_units
first_near_lat_units
Definition: sph.h:746
std::string _pass
pass
Definition: sph.h:894
std::string _last_near_long
last_near_long
Definition: sph.h:826
std::string get_sample_type()
sample_type
Definition: sph.h:470
std::string get_azimut_spacing()
azimut_spacing
Definition: sph.h:589
std::string _last_line_time_title
last_line_time_title
Definition: sph.h:730
std::string get_line_length()
line_length
Definition: sph.h:631
std::string get_sample_type_title()
sample_type_title
Definition: sph.h:463
std::string get_last_near_long()
last_near_long
Definition: sph.h:337
sph & operator=(const sph &rhs)
Copy operator.
Definition: sph.cpp:701
std::string get_first_near_long()
first_near_long
Definition: sph.h:211
std::string _azimut_looks
azimut_looks
Definition: sph.h:942
std::string get_range_spacing_title()
range_spacing_title
Definition: sph.h:561
std::string _first_far_lat_title
first_far_lat_title
Definition: sph.h:786
std::string get_first_far_long_title()
first_far_long_title
Definition: sph.h:288
std::string get_algorithm()
algorithm
Definition: sph.h:484
std::string _swath_title
swath_title
Definition: sph.h:882
std::string _azimut_spacing
azimut_spacing
Definition: sph.h:970
std::string _line_time_interv_units
line_time_interv_units
Definition: sph.h:986
std::string get_last_mid_long_units()
last_mid_long_units
Definition: sph.h:386
std::string _sample_type
sample_type
Definition: sph.h:902
sph()
Constructor.
Definition: sph.cpp:17
std::string _first_far_long_title
first_far_long_title
Definition: sph.h:798
std::string _compression
compression
Definition: sph.h:934
friend std::istream & operator>>(std::istream &is, sph &data)
This function read a sph from a stream.
Definition: sph.cpp:200
std::string get_last_near_lat_units()
last_near_lat_units
Definition: sph.h:323
std::string get_first_far_long_units()
first_far_long_units
Definition: sph.h:302
std::string _first_far_long_units
first_far_long_units
Definition: sph.h:806
bool update_sph_from_mph(mph &mph_rec)
update DSD number and dsd size from a mph record
Definition: sph.h:667
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23
std::string get_slice_position()
slice_position
Definition: sph.h:134
std::string _first_near_lat_title
first_near_lat_title
Definition: sph.h:738