OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ProcessedDataRecord.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 ProcessedDataRecord_h
13 #define ProcessedDataRecord_h
14 
15 #include <iostream>
16 
19 #include <ossim/base/ossimCommon.h>
20 
21 namespace ossimplugins
22 {
28 {
29 public:
34 
39 
44 
52  friend std::ostream& operator<<(std::ostream& os, const ProcessedDataRecord& data);
53 
58 
63  {
64  return new ProcessedDataRecord();
65  };
66 
71  {
72  return new ProcessedDataRecord(*this);
73  };
74 
78  void Read(std::istream& is)
79  {
80  is>>*this;
81  };
82 
86  void Write(std::ostream& os)
87  {
88  os<<*this;
89  };
93  int get_line_num() {return _line_num;};
94 
98  int get_rec_num() {return _rec_num;};
114  int get_sensor_updf() {return _sensor_updf;};
118  int get_acq_year() {return _acq_year;};
122  int get_acq_day() {return _acq_day;};
126  int get_acq_msec() {return _acq_msec;};
138  int get_tran_polar() {return _tran_polar;};
142  int get_recv_polar() {return _recv_polar;};
146  int get_prf() {return _prf;};
150  int get_sr_first() {return _sr_first;};
154  int get_sr_mid() {return _sr_mid;};
158  int get_sr_last() {return _sr_last;};
162  int get_fdc_first() {return _fdc_first;};
166  int get_fdc_mid() {return _fdc_mid;};
170  int get_fdc_last() {return _fdc_last;};
174  int get_ka_first() {return _ka_first;};
178  int get_ka_mid() {return _ka_mid;};
182  int get_ka_last() {return _ka_last;};
186  int get_nadir_ang() {return _nadir_ang;};
190  int get_squint_ang() {return _squint_ang;};
194  int get_geo_updf() {return _geo_updf;};
198  int get_lat_first() {return _lat_first;};
202  int get_lat_mid() {return _lat_mid;};
206  int get_lat_last() {return _lat_last;};
210  int get_lon_first() {return _lon_first;};
214  int get_lon_mid() {return _lon_mid;};
218  int get_lon_last() {return _lon_last;};
222  int get_north_first() {return _north_first;};
226  int get_north_last() {return _north_last;};
230  int get_east_first() {return _east_first;};
234  int get_east_last() {return _east_last;};
238  int get_heading() {return _heading;};
239 
240 protected:
244  int _line_num;
245 
249  int _rec_num;
273  int _acq_day;
297  int _prf;
305  int _sr_mid;
306 
310  int _sr_last;
315 
319  int _fdc_mid;
331  int _ka_mid;
335  int _ka_last;
355  int _lat_mid;
367  int _lon_mid;
391  int _heading;
392 
393 private:
397  template<typename T>
398  void SwitchEndian(T &value) {
399 
400  char *buffer;
401  char *res;
402  int nb_octets = sizeof(T);
403 
405  buffer = (char* )malloc(nb_octets);
406  res = (char* )malloc(nb_octets);
407 
408  memcpy(buffer,&value,nb_octets);
409 
410  for (int i=0; i<nb_octets/2; i++) {
411  res[i] = buffer[nb_octets-1-i];
412  res[nb_octets-1-i] = buffer[i];
413  }
414  memcpy(&value,res,nb_octets);
415 
416  free(buffer);
417  free(res);
418  }
419  }
420 };
421 }
422 #endif
friend std::ostream & operator<<(std::ostream &os, const ProcessedDataRecord &data)
This function writes the ProcessedDataRecord in a stream.
int get_ka_mid()
Mid pixel azimuth FM rate, Hz
int get_ka_first()
First pixel azimuth FM rate, Hz
void Read(std::istream &is)
Reads the class data from a stream.
int _fdc_mid
Mid pixel Doppler centroid, Hz
int get_lon_first()
First pixel longitude, 10e-6 deg.
int _n_right_pixel
Right fill pixel count
int get_fdc_mid()
Mid pixel Doppler centroid, Hz
void Write(std::ostream &os)
Writes the class to a stream.
int get_heading()
Line heading, 10e-6 deg.
int _recv_polar
Received polarization
int get_sr_first()
Slant range to first pixel, m
int _east_first
Easting of first pixel, m.
RadarSatRecord * Clone()
This function is able to create a new instance of the class initialised with the data of the calling ...
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
OSSIM_DLL ossimByteOrder byteOrder()
Definition: ossimCommon.cpp:54
int _heading
Line heading, 10e-6 deg.
int _geo_updf
Geographic ref parameter update flag
int get_recv_polar()
Received polarization
int get_east_first()
Easting of first pixel, m.
int get_sr_last()
Slant range to last pixel, m
int _fdc_last
Last pixel Doppler centroid, Hz
int _lat_first
First pixel latitude, 10e-6 deg
int get_north_last()
Northing of last pixel, m.
int get_nadir_ang()
Nadir look angle, 10e-6 deg
This class is the base class of all the record classes.
friend std::istream & operator>>(std::istream &is, ProcessedDataRecord &data)
This function reads a ProcessedDataRecord from a stream.
int get_n_data_pixel()
Data pixel count
int _squint_ang
Azimuth squint angle, 10e-6 deg
int get_sensor_updf()
Sensor parameter update flag
int _lon_last
Last-pixel longitude, 10e-6 deg.
int get_line_num()
Image data line number.
int get_east_last()
Easting of last pixel, m.
int get_n_left_pixel()
Left fill pixel count
int _lon_mid
Mid-pixel longitude, 10e-6 deg
int _sar_chan_ind
SAR channel indicator
int get_fdc_last()
Last pixel Doppler centroid, Hz
int _sr_mid
Slant range to mid-pixel, m
RadarSatRecord * Instanciate()
This function is able to create a new instance of the class.
int get_lon_last()
Last-pixel longitude, 10e-6 deg.
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.
int _lat_mid
Mid-pixel latitude, 10e-6 deg
int get_geo_updf()
Geographic ref parameter update flag
int _north_first
Northing of first pixel, m
int get_fdc_first()
First pixel Doppler centroid, Hz
ProcessedDataRecord & operator=(const ProcessedDataRecord &rhs)
Copy operator.
int _ka_last
Last pixel azimuth FM rate, Hz.
int get_lat_last()
Last-pixel latitude, 10e-6 deg.
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 get_acq_year()
Acquisition year
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 get_sar_chan_code()
SAR channel code
int _rec_num
Image data record index
int get_lat_mid()
Mid-pixel latitude, 10e-6 deg
int get_north_first()
Northing of first pixel, m
int get_acq_msec()
Acquisition msecs
int get_tran_polar()
Transmitted polarization
int get_squint_ang()
Azimuth squint angle, 10e-6 deg
int _n_left_pixel
Left fill pixel count
int get_lat_first()
First pixel latitude, 10e-6 deg
int get_rec_num()
Image data record index
int _lat_last
Last-pixel latitude, 10e-6 deg.
int _east_last
Easting of last pixel, m.
int get_sar_chan_ind()
SAR channel indicator
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23
int get_lon_mid()
Mid-pixel longitude, 10e-6 deg
int get_n_right_pixel()
Right fill pixel count
int get_ka_last()
Last pixel azimuth FM rate, Hz.
int get_sr_mid()
Slant range to mid-pixel, m