24 theErrorStatus(OSSIM_OK),
25 theHeaderFile(img_file),
26 theImageFile(img_file),
27 theValidImageRect(0,0,0,0),
43 else if (ext ==
"img")
100 int nBytesConsumed = 0;
101 const char* rawFieldData;
123 while(count < num_ifiles)
151 if(!(strncmp(product_type.
c_str(),
"ADRG", 4) == 0))
154 <<
"File does not appear to be an ADRG header file: " 170 if(img_base == img_file)
275 rawFieldData = oField->
GetData();
281 theTim[r] = atoi(
tim->ExtractStringData(rawFieldData, bytesOfData,
283 bytesOfData -= nBytesConsumed;
284 rawFieldData += nBytesConsumed;
310 os <<
"\nContents of ADRG Header file (.gen):" 322 <<
"\nTIF = " << adrg.
theTif 334 os <<
"\nTIM[" << m <<
"] = " << adrg.
theTim[m];
378 static const char MODULE[] =
"ossimAdrgHeader::parseLongitudeString";
382 if (lon.
size() != 11)
385 << MODULE <<
" Longitude string error!" 386 <<
"Bad longitude string: " << lon.
c_str() << std::endl;
389 const char* cstr = lon.
c_str();
391 double degrees = 0.0;
396 if (cstr[0] ==
'-')
sign = -1.0;
401 strncpy(tmp_str, cstr, 3);
402 degrees = atof(tmp_str);
407 strncpy(tmp_str, cstr, 2);
408 degrees += atof(tmp_str) / 60.0;
413 strncpy(tmp_str, cstr, 5);
414 degrees += atof(tmp_str) / 3600.0;
427 static const char MODULE[] =
"ossimAdrgHeader::parseLatitudeString";
431 if (lat.
size() != 10)
434 << MODULE <<
" Latitude string error!" 435 <<
"Bad latitude string: " << lat.
c_str() << std::endl;
438 const char* cstr = lat.
c_str();
440 double degrees = 0.0;
445 if (cstr[0] ==
'-')
sign = -1.0;
450 strncpy(tmp_str, cstr, 2);
451 degrees = atof(tmp_str);
456 strncpy(tmp_str, cstr, 2);
457 degrees += atof(tmp_str) / 60.0;
462 strncpy(tmp_str, cstr, 5);
463 degrees += atof(tmp_str) / 3600.0;
const char * ExtractStringData(const char *pachData, int nMaxBytes, int *pnConsumedBytes)
Extract a zero terminated string containing the data for this subfield.
Real sign(Real x, Real y)
Information from the DDR defining one field.
int GetDataSize()
Return the number of bytes in the data block returned by GetData().
ossimDDFField * FindField(const char *, int=0)
Find the named field within this record.
const char * GetSubfieldData(ossimDDFSubfieldDefn *, int *=NULL, int=0)
Fetch raw data pointer for a particular subfield of this field.
This object represents one field in a DDFRecord.
std::string::size_type size() const
unsigned int ossim_uint32
const char * chars() const
For backward compatibility.
ossimDDFSubfieldDefn * FindSubfieldDefn(const char *)
Find a subfield definition by it's mnemonic tag.
const char * GetData()
Return the pointer to the entire data block for this record.
static ossimString downcase(const ossimString &aString)
ossimDDFFieldDefn * GetFieldDefn()
Fetch the corresponding DDFFieldDefn.
void Close()
Close an ISO 8211 file.
int Open(const char *pszFilename, int bFailQuietly=false)
Open a ISO 8211 (DDF) file for reading.
The primary class for reading ISO 8211 files.
ossimFilename fileNoExtension() const
ossimDDFRecord * ReadRecord(void)
Read one record from the file.
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
Contains instance data from one data record (DR).
ossimFilename & setExtension(const ossimString &e)
Sets the extension of a file name.
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
std::basic_ostream< char > ostream
Base class for char output streams.
Information from the DDR record describing one subfield of a DDFFieldDefn.