39 std::list<EnvisatAsarRecord*>::const_iterator it = data.
_records.begin();
53 if (
sizeof(
int)!=4) std::cout <<
"EnvisatAsarData WARNING : (int) not coded over 32 bits, metadata might not be byte swapped correctly"<< std::endl ;
54 if (
sizeof(
float)!=4) std::cout <<
"EnvisatAsarData WARNING : (float) not coded over 32 bits, metadata might not be byte swapped correctly"<< std::endl ;
55 if (
sizeof(
double)!=8) std::cout <<
"EnvisatAsarData WARNING : (double) not coded over 64 bits, metadata might not be byte swapped correctly"<< std::endl ;
66 ((
sph*)sph_record)->update_sph_from_mph(*((
mph *)mph_record));
70 std::vector<dsd> dsd_vector = ((
sph*)sph_record)->get_dsd_vector();
74 std::vector<dsd>::iterator it = dsd_vector.begin();
75 while(it != dsd_vector.end())
77 std::string str = (it->get_ds_name());
79 if ( (it->get_ds_size()) != 0)
81 for (
int i = 0; i<(it->get_num_dsr()); i++)
86 is.seekg((std::streampos)(it->get_ds_offset())+ (std::streampos)(i*(it->get_dsr_size())));
101 std::list<EnvisatAsarRecord*>::const_iterator it = rhs.
_records.begin();
112 std::list<EnvisatAsarRecord*>::const_iterator it = rhs.
_records.begin();
124 std::list<EnvisatAsarRecord*>::const_iterator it =
_records.begin();
134 std::list<EnvisatAsarRecord*>::const_iterator it =
_records.begin();
137 if ((*it)->get_mnemonic().compare(
"mph_rec") == 0)
return (
mph*)(*it);
144 std::list<EnvisatAsarRecord*>::const_iterator it =
_records.begin();
147 if ((*it)->get_mnemonic().compare(
"sph_rec") == 0)
return (
sph*)(*it);
155 std::list<EnvisatAsarRecord*>::const_iterator it =
_records.begin();
158 if ((*it)->get_mnemonic().compare(
"SQ_ADSR_rec") == 0)
return (
SQ_ADSR*)(*it);
165 std::list<EnvisatAsarRecord*>::const_iterator it =
_records.begin();
175 std::list<EnvisatAsarRecord*>::const_iterator it =
_records.begin();
185 std::list<EnvisatAsarRecord*>::const_iterator it =
_records.begin();
189 if ((*it)->get_mnemonic().compare(
"SRGRConversionParameters_rec") == 0)
202 std::list<EnvisatAsarRecord*>::const_iterator it =
_records.begin();
205 if ((*it)->get_mnemonic().compare(
"ChirpParameters_rec") == 0)
return (
ChirpParameters*)(*it);
212 std::list<EnvisatAsarRecord*>::const_iterator it =
_records.begin();
240 std::list<EnvisatAsarRecord*>::const_iterator it =
_records.begin();
242 int total_num_ds = 0;
245 std::string str = (*it)->get_mnemonic();
246 if ((*it)->get_mnemonic().compare(
"GeolocationGrid_rec") == 0) total_num_ds += 1;
254 std::string str = (*it)->get_mnemonic();
255 if ((*it)->get_mnemonic().compare(
"GeolocationGrid_rec") == 0)
257 if ((cpt == num_ds) || (cpt == total_num_ds-1))
return (
GeolocationGrid*)(*it);
269 if (record == NULL)
return 0;
270 std::list<EnvisatAsarRecord*>::const_iterator it =
_records.begin();
274 std::string str = (*it)->get_mnemonic();
275 if ((*it)->get_mnemonic().compare(record->
get_mnemonic()) == 0)
EnvisatAsarData()
Constructor.
This class is able to read the SAR sph record of the ASAR file.
~EnvisatAsarData()
Destructor.
MainProcessingParameters * get_MainProcessingParameters()
This class is a factory able to construct Record base classes.
std::string get_mnemonic()
Returns the mnemonic of the record.
GeolocationGrid * get_GeolocationGrid(int num_ds=0)
ChirpParameters * get_ChirpParameters()
This class is able to read the ASAR SQ_ADSR record.
EnvisatAsarData & operator=(const EnvisatAsarData &rhs)
Copy operator.
DopplerCentroidParameters * get_DopplerCentroidParameters()
std::ostream & operator<<(std::ostream &os, const AlosPalsarData &data)
This class is able to read the ASAR DopplerCentroidParameters record.
This class is able to read the ASAR MainProcessingParameters record.
This class is able to read the Envisat file structure.
virtual void Read(std::istream &is)=0
Reads the class data from a stream.
This class is able to read the ASAR ChirpParameters record.
This class is able to read the ASAR mph record of the leader file.
std::istream & operator>>(std::istream &is, AlosPalsarData &data)
void ClearRecords()
Removes all the previous records from the EnvisatAsarData.
std::list< EnvisatAsarRecord * > _records
std::basic_istream< char > istream
Base class for char input streams.
This class is able to read the ASAR SRGRConversionParameters record.
EnvisatAsarRecord * Instanciate(std::string id)
Instanciatse a new Record.
SRGRConversionParameters * get_SRGRConversionParameters(int pos=0)
This class is the base class of all the Envisat ASAR record classes.
This class is able to read the ASAR GeolocationGrid record.
This class is able to read the ASAR AntennaElevationPatterns record.
AntennaElevationPatterns * get_AntennaElevationPatterns()
std::basic_ostream< char > ostream
Base class for char output streams.
int get_num_ds(EnvisatAsarRecord *record)