35 "ossimNitfFileHeaderV2_1",
59 return out <<
"theImageSubheaderLength: " 61 <<
"\ntheImageLength: " 84 return out <<
"theGraphicSubheaderLength: " 86 <<
"\ntheGraphicLength: " 94 return out <<
"theTextFileSubheaderLength: " 96 <<
"\ntheTextFileLength: " 121 << std::setiosflags(ios::right)
134 << std::setiosflags(ios::right)
160 return out <<
"theDataExtSegSubheaderLength: " 162 <<
"\ntheDataExtSegLength: " 185 return out <<
"theResExtSegSubheaderLength: " 187 <<
"\ntheResExtSegLength: " 213 << std::setiosflags(ios::right)
226 << std::setiosflags(ios::right)
349 std::streampos start = in.tellg();
350 std::streampos current = in.tellg();
351 if(userDefinedHeaderLength > 0)
354 current = in.tellg();
356 while((current - start) < userDefinedHeaderLength)
363 current = in.tellg();
373 current = in.tellg();
375 if(extendedHeaderDataLength > 0)
378 current = in.tellg();
379 while((current - start) < extendedHeaderDataLength)
387 current = in.tellg();
390 in.seekg(start + extendedHeaderDataLength);
421 const vector<ossimNitfTagInformation> &desTags = des->
getTagList();
422 for (vector<ossimNitfTagInformation>::const_iterator iter = desTags.begin(); iter != desTags.end(); ++iter)
424 iter->setTagType(
"UDHD");
437 const vector<ossimNitfTagInformation> &desTags = des->
getTagList();
438 for (vector<ossimNitfTagInformation>::const_iterator iter = desTags.begin(); iter != desTags.end(); ++iter)
440 iter->setTagType(
"XHD");
497 outString << std::setw(3)
499 << std::setiosflags(ios::right)
502 out.write(outString.str().c_str(), 3);
513 outString << std::setw(3)
515 << std::setiosflags(ios::right)
518 out.write(outString.str().c_str(), 3);
529 outString << std::setw(3)
531 << std::setiosflags(ios::right)
534 out.write(outString.str().c_str(), 3);
544 outString << std::setw(3)
546 << std::setiosflags(ios::right)
549 out.write(outString.str().c_str(), 3);
559 outString << std::setw(3)
561 << std::setiosflags(ios::right)
564 out.write(outString.str().c_str(), 3);
621 tempOut << std::setw(5)
623 << std::setiosflags(ios::right)
626 out.write(tempOut.str().c_str(), 5);
631 if(totalLength <= 99999)
635 for (
unsigned int i = 0; i <
theTagList.size(); ++i)
658 tempOut << std::setw(5)
660 << std::setiosflags(ios::right)
663 out.write(tempOut.str().c_str(), 5);
668 if(totalLength <= 99999)
672 for(
unsigned int i = 0; i <
theTagList.size(); ++i)
689 const std::string& prefix)
const 691 out << setiosflags(ios::left)
692 << prefix << std::setw(24) <<
"FHDR:" 694 << prefix << std::setw(24) <<
"CLEVEL:" 696 << prefix << std::setw(24) <<
"STYPE:" 698 << prefix << std::setw(24) <<
"OSTAID:" 700 << prefix << std::setw(24) <<
"FDT:" 702 << prefix << std::setw(24) <<
"FTITLE:" 704 << prefix << std::setw(24) <<
"FSCLAS:" 706 << prefix << std::setw(24) <<
"FSCLSY:" 708 << prefix << std::setw(24) <<
"FSCODE:" 710 << prefix << std::setw(24) <<
"FSCTLH:" 712 << prefix << std::setw(24) <<
"FSREL:" 714 << prefix << std::setw(24) <<
"FSDCTP:" 716 << prefix << std::setw(24) <<
"FSDCDT:" 718 << prefix << std::setw(24) <<
"FSDCXM:" 720 << prefix << std::setw(24) <<
"FSDG:" 722 << prefix << std::setw(24) <<
"FSDGDT:" 724 << prefix << std::setw(24) <<
"FSCLTX:" 726 << prefix << std::setw(24) <<
"FSCATP:" 728 << prefix << std::setw(24) <<
"FSCAUT:" 730 << prefix << std::setw(24) <<
"FSCRSN:" 732 << prefix << std::setw(24) <<
"FSSRDT:" 734 << prefix << std::setw(24) <<
"FSCTLN:" 736 << prefix << std::setw(24) <<
"FSCOP:" 738 << prefix << std::setw(24) <<
"FSCOPYS:" 740 << prefix << std::setw(24) <<
"ENCRYP:" 742 << prefix << std::setw(24) <<
"FBKGC[0]:" 744 << prefix << std::setw(24) <<
"FBKGC[1]:" 746 << prefix << std::setw(24) <<
"FBKGC[2]:" 748 << prefix << std::setw(24) <<
"ONAME:" 750 << prefix << std::setw(24) <<
"OPHONE:" 752 << prefix << std::setw(24) <<
"FL:" 754 << prefix << std::setw(24) <<
"HL:" 756 << prefix << std::setw(24) <<
"NUMI:" 764 os << setw(3) << setfill(
'0') << (index+1) <<
":";
769 out << prefix << std::setw(24) << tmpStr
774 out << prefix << std::setw(24) << tmpStr
784 os << setw(3) << setfill(
'0') << (index+1) <<
":";
789 out << prefix << std::setw(24) << tmpStr
796 out << prefix << std::setw(24) << tmpStr
802 << prefix << std::setw(24) <<
"NUMT:" 808 os << setw(3) << setfill(
'0') << (index+1) <<
":";
813 out << prefix << std::setw(24) << tmpStr
820 out << prefix << std::setw(24) << tmpStr
830 os << setw(3) << setfill(
'0') << (index+1) <<
":";
835 out << prefix << std::setw(24) << tmpStr
842 out << prefix << std::setw(24) << tmpStr
847 out << prefix << std::setw(24) <<
"NUMRES:" 853 os << setw(3) << setfill(
'0') << (index+1) <<
":";
858 out << prefix << std::setw(24) << tmpStr
865 out << prefix << std::setw(24) << tmpStr
870 out << prefix << std::setw(24) <<
"UDHDL:" 873 << prefix << std::setw(24) <<
"UDHOFL:" 876 << prefix << std::setw(24) <<
"XHDL:" 879 << prefix << std::setw(24) <<
"XHDLOFL:" 931 if(temp ==
"999999999999")
1038 for(index=0; index < numberOfImages; index++)
1061 for(index=0; index < numberOfGraphics; index++)
1083 for(index=0; index < numberOfTextFiles; index++)
1104 for(index=0; index < numberOfDataExtSegs; index++)
1132 for(index=0; index < numberOfResExtSegs; index++)
1317 <<
"\nNo images in file or image number (" << imageNumber
1318 <<
") is out of range!\n";
1366 (dataExtNumber >= 0))
1475 out << std::setw(12)
1476 << std::setfill(
'0')
1477 << std::setiosflags(ios::right)
1492 << std::setfill(
'0')
1493 << std::setiosflags(ios::right)
1500 std::string s =
"ossimNitfFileHeaderV2_1::setNumberOfGraphicInfoRecords:";
1501 s +=
" ERROR\nExceeded max number of 999!";
1506 throw std::out_of_range(s);
1518 << std::setfill(
'0')
1519 << std::setiosflags(ios::right)
1526 std::string s =
"ossimNitfFileHeaderV2_1::setNumberOfDataExtSegInfoRecords:";
1527 s +=
" ERROR\nExceeded max number of 999!";
1532 throw std::out_of_range(s);
1544 << std::setfill(
'0')
1545 << std::setiosflags(ios::right)
1552 std::string s =
"ossimNitfFileHeaderV2_1::setNumberOfTextRecords:";
1553 s +=
" ERROR\nExceeded max number of 999!";
1558 throw std::out_of_range(s);
1570 << std::setfill(
'0')
1571 << std::setiosflags(ios::right)
1578 std::string s =
"ossimNitfFileHeaderV2_1::setNumberOfImageInfoRecords:";
1579 s +=
" ERROR\nExceeded max image info number of 999!";
1584 throw std::out_of_range(s);
1593 << std::setfill(
'0')
1594 << std::setiosflags(ios::right)
1605 << std::setfill(
' ')
1606 << std::setiosflags(ios::left)
1616 out << std::setw(11)
1617 << std::setfill(
' ')
1618 << std::setiosflags(ios::left)
1629 << std::setfill(
' ')
1630 << std::setiosflags(ios::left)
1640 out << std::setw(20)
1641 << std::setfill(
' ')
1642 << std::setiosflags(ios::left)
1653 << std::setfill(
' ')
1654 << std::setiosflags(ios::left)
1655 << declassType.
trim();
1678 << std::setfill(
' ')
1679 << std::setiosflags(ios::left)
1680 << exemption.
trim();
1690 << std::setfill(
' ')
1691 << std::setiosflags(ios::left)
1692 << downgrade.
trim();
1714 out << std::setw(43)
1715 << std::setfill(
' ')
1716 << std::setiosflags(ios::left)
1717 << classificationText.
trim();
1727 << std::setfill(
' ')
1728 << std::setiosflags(ios::left)
1729 << authorityType.
trim();
1738 out << std::setw(40)
1739 << std::setfill(
' ')
1740 << std::setiosflags(ios::left)
1741 << authority.
trim();
1751 << std::setfill(
' ')
1752 << std::setiosflags(ios::left)
1775 out << std::setw(15)
1776 << std::setfill(
' ')
1777 << std::setiosflags(ios::left)
1796 out << std::setw(24)
1797 << std::setfill(
' ')
1798 << std::setiosflags(ios::left)
1808 out << std::setw(18)
1809 << std::setfill(
' ')
1810 << std::setiosflags(ios::left)
1877 std::vector<ossimString> splitString;
1878 value = value.
trim();
1879 value.
split(splitString,
" ");
1880 if(splitString.size() == 3)
1893 if(!property.
valid())
return;
1954 std::vector<ossimString> splitString;
1955 value = value.
trim();
1956 value.
split(splitString,
" ");
1957 if(splitString.size() == 3)
2013 property = stringProperty;
2036 property = stringProperty;
2053 property = stringProperty;
2068 property = colorProperty;
2094 propertyNames.push_back(
FSDG_KW);
2128 overflowTags.clear();
2129 std::vector<ossimNitfTagInformation>::iterator iter;
2130 std::vector<ossimNitfTagInformation> specifiedTags;
2131 const ossimString tagType(userDefinedTags ?
"UDHD" :
"XHD");
2134 if (iter->getTagType() == tagType)
2136 specifiedTags.push_back(*iter);
2140 std::sort(specifiedTags.begin(), specifiedTags.end());
2144 for (iter = specifiedTags.begin(); iter != specifiedTags.end() &&
2145 totalSize + iter->getTotalTagLength() <= maxSize; ++iter)
2147 totalSize += iter->getTotalTagLength();
2150 for (; iter != specifiedTags.end(); ++iter)
2152 overflowTags.push_back(*iter);
2157 if (overflowTags.empty() ==
true)
2159 potentialDesIndex = 0;
2163 overflowDes << std::setw(3)
2164 << std::setfill(
'0')
2165 << std::setiosflags(ios::right)
2166 << potentialDesIndex;
2169 tagLength << std::setw(5)
2170 << std::setfill(
'0')
2171 << std::setiosflags(ios::right)
2175 if (userDefinedTags)
2186 return (overflowTags.empty() ==
false);
ossim_uint64 getTotalLength() const
virtual void valueToString(ossimString &valueResult) const =0
ossim_uint64 getDataExtSegLength() const
static ossimString upcase(const ossimString &aString)
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
ossim_uint64 getHeaderLength() const
char theResExtSegSubheaderLength[5]
Is a 4 byte numeric 0-9999.
char theImageLength[11]
Is a 10 byte numeric 0000000001-9999999999.
Represents serializable keyword/value map.
const char * find(const char *key) const
ossim_uint64 getHeaderLength() const
void setSubheaderLength(ossim_uint32 length)
char theDataExtSegLength[10]
Is a 9 byte numeric 0-999999999.
ossim_uint64 getImageLength() const
void split(std::vector< ossimString > &result, const ossimString &separatorList, bool skipBlankFields=false) const
Splits this string into a vector of strings (fields) using the delimiter list specified.
ossim_uint32 toUInt32() const
ossim_uint64 getTotalLength() const
void addConstraint(const ossimString &value)
char theDataExtSegSubheaderLength[5]
Is a 4 byte numeric 200-9999.
ossim_uint64 getTotalLength() const
char theTextFileLength[6]
Is a 5 byte numeric 0-99999.
ossim_uint64 getTotalLength() const
ossim_int32 toInt32() const
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
ossim_uint64 getHeaderLength() const
std::string::size_type size() const
bool toBool() const
String to numeric methods.
ossim_uint8 getRed() const
unsigned long long ossim_uint64
char theGraphicSubheaderLength[5]
Is a 4 byte numeric 0258-9999.
void setImageLength(ossim_uint64 length)
unsigned int ossim_uint32
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.
ossim_uint8 getGreen() const
virtual void parseStream(std::istream &in, ossim_uint64 dataLength)=0
ossim_uint64 getResExtSegLength() const
static ossimPreferences * instance()
char theResExtSegLength[8]
Is a 7 byte numeric 0-9999999.
void seekg64(off_type off, ios_base::seekdir way)
std::basic_istream< char > istream
Base class for char input streams.
ossim_uint64 getGraphicLength() const
char theImageSubheaderLength[7]
Is a 6 byte numeric 000439-999999.
char theTextFileSubheaderLength[5]
Is a 4 byte numeric 0282-9999.
void setTextLength(ossim_uint64 length)
char theGraphicLength[7]
Is a 6 byte numeric 0000001-9999999.
ossim_uint64 toUInt64() const
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
ossim_uint64 getTotalLength() const
ossim_int64 toInt64() const
virtual const std::vector< ossimNitfTagInformation > & getTagList() const =0
ossim_uint64 getHeaderLength() const
#define RTTI_DEF1(cls, name, b1)
void setSubheaderLength(ossim_uint64 length)
unsigned char ossim_uint8
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
ossim_uint8 getBlue() const
std::basic_ostream< char > ostream
Base class for char output streams.
ossim_uint64 getTextLength() const
ossim_uint64 getHeaderLength() const