39 std::map<int, RadarSatRecord*>::const_iterator it = data.
_records.begin();
42 (*it).second->Write(os);
55 if (
sizeof(
int)!=4)
ossimNotify(
ossimNotifyLevel_WARN) <<
"RadarSat Data WARNING : (int) not coded over 32 bits, metadata might not be byte swapped correctly"<< std::endl ;
56 if (
sizeof(
float)!=4)
ossimNotify(
ossimNotifyLevel_WARN) <<
"RadarSat Data WARNING : (float) not coded over 32 bits, metadata might not be byte swapped correctly"<< std::endl ;
57 if (
sizeof(
double)!=8)
ossimNotify(
ossimNotifyLevel_WARN) <<
"RadarSat Data WARNING : (double) not coded over 64 bits, metadata might not be byte swapped correctly"<< std::endl ;
65 is.seekg(0, std::ios::end) ;
66 int lengthOfFile = is.tellg();
67 is.seekg(0, std::ios::beg);
77 if (header.get_rec_seq() == 1)
93 char* buff =
new char[header.get_length()-12];
94 is.read(buff, header.get_length()-12);
98 else if ((header.get_rec_seq() == 2))
100 lineLength = header.get_length() ;
107 char* buff =
new char[header.get_length()-192];
108 is.read(buff, header.get_length()-192);
113 char* buff =
new char[header.get_length()-12];
114 is.read(buff, header.get_length()-12);
118 else if ((header.get_rec_seq() == (1+nbLin)))
126 char* buff =
new char[header.get_length()-192];
127 is.read(buff, header.get_length()-192);
132 char* buff =
new char[header.get_length()-12];
133 is.read(buff, header.get_length()-12);
145 int nbLines = ( ( lengthOfFile - is.tellg() ) / lineLength ) + 2;
149 is.seekg((nbLines - 2) * lineLength - 12, std::ios::cur);
160 is.seekg((nbLin - 2) * lineLength - 12, std::ios::cur);
166 is.seekg(0, std::ios::end) ;
177 std::map<int, RadarSatRecord*>::const_iterator it = rhs.
_records.begin();
180 _records[(*it).first] = (*it).second->Clone();
187 std::map<int, RadarSatRecord*>::const_iterator it =
_records.begin();
198 _records[(*it).first] = (*it).second->Clone();
207 std::map<int, RadarSatRecord*>::const_iterator it =
_records.begin();
RadarSatRecord * Instanciate(int id)
Instanciates a new Record.
void set_nlin(int inNbLines)
Set the number of lines per data set.
ProcessedDataRecord * get_FirstProcessedDataRecord()
This class is the base class of all the record classes.
virtual void Read(std::istream &is)=0
Reads the class data from a stream.
Data & operator=(const Data &rhs)
Copy operator.
std::ostream & operator<<(std::ostream &os, const AlosPalsarData &data)
static const int LastProcessedDataRecordID
This class is able to read an Processed Data Record.
ProcessedDataRecord * get_LastProcessedDataRecord()
std::istream & operator>>(std::istream &is, AlosPalsarData &data)
static const int ImageOptionsFileDescriptorID
This class is able to read an Image options file descriptor record.
std::basic_istream< char > istream
Base class for char input streams.
std::map< int, RadarSatRecord * > _records
static const int FirstProcessedDataRecordID
void ClearRecords()
Removes all the previous records from the Data.
This class is able to read the data file of the RadarSat file structure.
void InsertRecord(int id, RadarSatRecord *record)
Inserts an existing record in the Data.
This class is a factory able to construct Record base classes.
ImageOptionsFileDescriptor * get_ImageOptionsFileDescriptor()
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
std::basic_ostream< char > ostream
Base class for char output streams.