33 "ossimNitfImageHeaderV2_1",
118 if(numberOfComments > 0)
124 memset(comment,
' ', 80);
126 in.read(comment, 80);
145 if (numberOfBands == 0)
152 for (
ossim_int32 band = 0; band < numberOfBands; ++band)
171 std::streampos start = in.tellg();
172 std::streampos current = in.tellg();
174 std::streampos userDefinedDataLen
176 if(userDefinedDataLen > 0)
179 current = in.tellg();
181 while((current - start) < userDefinedDataLen)
188 current = in.tellg();
192 if (overflow != 0 && file != NULL)
197 const vector<ossimNitfTagInformation> &desTags = des->
getTagList();
198 for (vector<ossimNitfTagInformation>::const_iterator iter = desTags.begin(); iter != desTags.end(); ++iter)
200 iter->setTagType(
"UDID");
211 current = in.tellg();
212 if(extSubHeadLen > 0)
215 current = in.tellg();
216 while((current - start) < extSubHeadLen)
224 current = in.tellg();
228 if (overflow != 0 && file != NULL)
233 const vector<ossimNitfTagInformation> &desTags = des->
getTagList();
234 for (vector<ossimNitfTagInformation>::const_iterator iter = desTags.begin(); iter != desTags.end(); ++iter)
236 iter->setTagType(
"IXSHD");
245 compressionType = compressionType.
trim().
upcase();
252 if((compressionType ==
"NM")||
253 (compressionType ==
"M1")||
254 (compressionType ==
"M3")||
255 (compressionType ==
"M4")||
256 (compressionType ==
"M5")||
257 (compressionType ==
"C4"))
278 in.read((
char*)(&padOutputPixelCode), 1);
307 in.read((
char*)(blockRead), totalNumber*4);
308 for(idx = 0; idx < totalNumber; ++idx)
312 endian.
swap(blockRead[idx]);
333 in.read((
char*)(blockRead), totalNumber*4);
334 for(idx = 0; idx < totalNumber; ++idx)
338 endian.
swap(blockRead[idx]);
354 compressionHeader = 0;
418 memset(icom,
' ', 80);
427 if(compressionTest !=
"NC" &&
428 compressionTest !=
"NM")
476 if (totalLength == 0)
484 if(totalLength <= 99999)
488 tempOut << std::setw(5)
490 << std::setiosflags(ios::right)
498 if (theExtendedSubheaderDataLenBytes > 0)
522 <<
"WARNING ossimNitfFileHeaderV2_1::writeStream: Only support writing of total tag length < 99999" << std::endl;
528 const std::string& prefix)
const 530 out << setiosflags(ios::left)
531 << prefix << setw(24)
533 << prefix << setw(24)
535 << prefix << setw(24)
537 << prefix << setw(24)
539 << prefix << setw(24)
541 << prefix << setw(24)
543 << prefix << setw(24)
545 << prefix << setw(24)
547 << prefix << setw(24)
549 << prefix << setw(24)
551 << prefix << setw(24)
553 << prefix << setw(24)
555 << prefix << setw(24)
557 << prefix << setw(24)
559 << prefix << setw(24)
561 << prefix << setw(24)
563 << prefix << setw(24)
565 << prefix << setw(24)
567 << prefix << setw(24)
569 << prefix << setw(24)
571 << prefix << setw(24)
573 << prefix << setw(24)
575 << prefix << setw(24)
577 << prefix << setw(24)
579 << prefix << setw(24)
581 << prefix << setw(24)
583 << prefix << setw(24)
585 << prefix << setw(24)
587 << prefix << setw(24)
589 << prefix << setw(24)
591 << prefix << setw(24)
593 << prefix << setw(24)
595 << prefix << setw(24)
602 out << prefix << std::setw(24) << icpre <<
theImageComments[idx].trim() <<
"\n";
605 out << prefix << setw(24)
607 << prefix << setw(24)
609 << prefix << setw(24)
611 << prefix << setw(24)
622 out << prefix << setw(24)
624 << prefix << setw(24)
626 << prefix << setw(24)
628 << prefix << setw(24)
630 << prefix << setw(24)
632 << prefix << setw(24)
634 << prefix << setw(24)
636 << prefix << setw(24)
638 << prefix << setw(24)
640 << prefix << setw(24)
642 << prefix << setw(24)
644 << prefix << setw(24)
646 << prefix << setw(24)
648 << prefix << setw(24)
650 << prefix << setw(24)
652 << prefix << setw(24)
654 << prefix << setw(24)
656 << prefix << setw(24)
658 << prefix << setw(24)
660 << prefix << setw(24)
665 out << prefix << setw(24)
719 kwl.
add(prefix, kwlTemp);
837 return ((temp !=
"NC") && (temp !=
"NM"));
964 (blockNumber < maxBlock))
989 (blockNumber < maxBlock))
1213 << std::setfill(
'0')
1214 << std::setiosflags(ios::right)
1245 if(rows > 99999999) rows = 99999999;
1254 if(cols > 99999999) cols = 99999999;
1308 out << (ul.
lat >= 0.0?
"+":
"")
1310 << std::setfill(
'0')
1311 << std::setprecision(3)
1312 << std::setiosflags(std::ios::fixed)
1314 << (ul.
lon >= 0.0?
"+":
"")
1316 << std::setfill(
'0')
1317 << std::setprecision(3)
1318 << std::setiosflags(std::ios::fixed)
1320 out << (ur.
lat >= 0.0?
"+":
"")
1322 << std::setfill(
'0')
1323 << std::setprecision(3)
1324 << std::setiosflags(std::ios::fixed)
1326 << (ur.
lon >= 0.0?
"+":
"")
1328 << std::setfill(
'0')
1329 << std::setprecision(3)
1330 << std::setiosflags(std::ios::fixed)
1332 out << (lr.
lat >= 0.0?
"+":
"")
1334 << std::setfill(
'0')
1335 << std::setprecision(3)
1336 << std::setiosflags(std::ios::fixed)
1338 << (lr.
lon >= 0.0?
"+":
"")
1340 << std::setfill(
'0')
1341 << std::setprecision(3)
1342 << std::setiosflags(std::ios::fixed)
1344 out << (ll.
lat >= 0.0?
"+":
"")
1346 << std::setfill(
'0')
1347 << std::setprecision(3)
1348 << std::setiosflags(std::ios::fixed)
1350 << (ll.
lon >= 0.0?
"+":
"")
1352 << std::setfill(
'0')
1353 << std::setprecision(3)
1354 << std::setiosflags(std::ios::fixed)
1369 encodeUtm(zone, ul, ur, lr, ll).c_str(), 60);
1381 encodeUtm(zone, ul, ur, lr, ll).c_str(), 60);
1474 if(!property)
return;
1645 propertyNames.push_back(
ISDG_KW);
1683 std::string s =
"ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUTM zone greate than 60!";
1688 throw std::out_of_range(s);
1696 std::string s =
"ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUpper left easting too large for NITF field!";
1701 throw std::out_of_range(s);
1706 std::string s =
"ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUpper left northing too large for NITF field!";
1711 throw std::out_of_range(s);
1730 std::string s =
"ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUpper right easting too large for NITF field!";
1735 throw std::out_of_range(s);
1740 std::string s =
"ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nUpper right northing too large for NITF field!";
1745 throw std::out_of_range(s);
1762 std::string s =
"ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nLower right easting too large for NITF field!";
1767 throw std::out_of_range(s);
1772 std::string s =
"ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nLower right northing too large for NITF field!";
1777 throw std::out_of_range(s);
1795 std::string s =
"ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nLower left easting too large for NITF field!";
1800 throw std::out_of_range(s);
1805 std::string s =
"ossimNitfImageHeaderV2_1::encodeUtm: ERROR\nLower left northing too large for NITF field!";
1810 throw std::out_of_range(s);
1823 return out.str().c_str();
1829 overflowTags.clear();
1830 std::vector<ossimNitfTagInformation>::iterator iter;
1831 std::vector<ossimNitfTagInformation> specifiedTags;
1832 const ossimString tagType(userDefinedTags ?
"UDID" :
"IXSHD");
1835 if (iter->getTagType() == tagType)
1837 specifiedTags.push_back(*iter);
1841 std::sort(specifiedTags.begin(), specifiedTags.end());
1845 for (iter = specifiedTags.begin(); iter != specifiedTags.end() &&
1846 totalSize + iter->getTotalTagLength() <= maxSize; ++iter)
1848 totalSize += iter->getTotalTagLength();
1851 for (; iter != specifiedTags.end(); ++iter)
1853 overflowTags.push_back(*iter);
1858 if (overflowTags.empty() ==
true)
1860 potentialDesIndex = 0;
1864 overflowDes << std::setw(3)
1865 << std::setfill(
'0')
1866 << std::setiosflags(ios::right)
1867 << potentialDesIndex;
1870 tagLength << std::setw(5)
1871 << std::setfill(
'0')
1872 << std::setiosflags(ios::right)
1875 if (userDefinedTags)
1886 return (overflowTags.empty() ==
false);
virtual void valueToString(ossimString &valueResult) const =0
static ossimString upcase(const ossimString &aString)
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Represents serializable keyword/value map.
const char * find(const char *key) const
bool contains(char aChar) const
static ossimString toString(bool aValue)
Numeric to string methods.
ossim_uint32 toUInt32() const
ossim_int32 toInt32() const
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
unsigned long long ossim_uint64
unsigned int ossim_uint32
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.
static ossimString downcase(const ossimString &aString)
ossimByteOrder getSystemEndianType() const
void seekg64(off_type off, ios_base::seekdir way)
std::basic_istream< char > istream
Base class for char input streams.
long toLong() const
toLong's deprecated, please use the toInts...
virtual bool parseStream(ossim::istream &is, bool ignoreBinaryChars)
deprecated method
static void setField(void *fieldDestination, const ossimString &src, std::streamsize width, std::ios_base::fmtflags ioflags=std::ios::left, char fill=' ')
Sets a field with a given string, width, and IOS flags.
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
virtual const std::vector< ossimNitfTagInformation > & getTagList() const =0
#define RTTI_DEF1(cls, name, b1)
std::basic_istringstream< char > istringstream
Class for char input memory streams.
unsigned char ossim_uint8
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
std::basic_ostream< char > ostream
Base class for char output streams.
ossimString toString(const ossimString &formatString=ossimString("")) const
You can specify a number of different formats.