OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimDtedHdr.h
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: MIT
4 //
5 // See LICENSE.txt file in the top level directory for more details.
6 //
7 // Author: Ken Melero
8 //
9 // Description: This class gives access to the File Header Label
10 // (HDR) of a DTED Level 1 file.
11 //
12 //********************************************************************
13 // $Id: ossimDtedHdr.h 16104 2009-12-17 18:09:59Z gpotts $
14 
15 #ifndef ossimDtedHdr_H
16 #define ossimDtedHdr_H
17 #include <iosfwd>
21 #include <ossim/base/ossimRefPtr.h>
22 #include <ossim/base/ossimIosFwd.h>
23 #include <memory>
24 
25 class ossimProperty;
26 
28 {
29 public:
30  ossimDtedHdr();
31  ossimDtedHdr(std::shared_ptr<ossim::istream>& str, ossim_int64 offset=0);
32 
33  enum
34  {
35  HDR_LENGTH = 80,
36  HDR_ONE_LABEL_1 = 4,
37  HDR_FILENAME = 5,
38  HDR_UNIVAC = 22,
39  HDR_REEL = 28,
40  HDR_FILE_NUM = 32,
41  HDR_GENERATION_NUM = 36,
42  HDR_VERSION_NUM = 40,
43  HDR_CREATION_DATE = 42,
44  HDR_EXPIRATION_DATE = 48,
45  HDR_ACCESS = 54,
46  HDR_BLOCK_COUNT = 55,
47  HDR_QUALIFIER = 61,
48  HDR_BLANKS = 74,
49  FIELD1_SIZE = 3,
50  FIELD2_SIZE = 1,
51  FIELD3_SIZE = 17,
52  FIELD4_SIZE = 6,
53  FIELD5_SIZE = 4,
54  FIELD6_SIZE = 4,
55  FIELD7_SIZE = 4,
56  FIELD8_SIZE = 2,
57  FIELD9_SIZE = 6,
58  FIELD10_SIZE = 6,
59  FIELD11_SIZE = 1,
60  FIELD12_SIZE = 6,
61  FIELD13_SIZE = 13,
62  FIELD14_SIZE = 7
63  };
64 
65  // The Recognition Sentinel signifies if the HDR record exists.
66  ossimString recognitionSentinel() const;
67 
68  ossimString fileName() const;
69  ossimString version() const;
70  ossimString creationDate() const;
71  ossim_int32 startOffset() const;
72  ossim_int32 stopOffset() const;
73 
75  const ossimDtedHdr& hdr);
76 
87  const std::string& prefix) const;
88 
89  void parse(std::istream& in);
90 
97  ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
98 
103  void getPropertyNames(std::vector<ossimString>& propertyNames)const;
104 
105 private:
106  // Do not allow...
107  ossimDtedHdr(const ossimDtedHdr& source);
108  const ossimDtedHdr& operator=(const ossimDtedHdr& rhs);
109 
110  char theRecSen[FIELD1_SIZE+1];
111  char theField2[FIELD2_SIZE+1];
112  char theFilename[FIELD3_SIZE+1];
113  char theField4[FIELD4_SIZE+1];
114  char theField5[FIELD5_SIZE+1];
115  char theField6[FIELD6_SIZE+1];
116  char theVersion[FIELD7_SIZE+1];
117  char theCreationDate[FIELD8_SIZE+1];
118  char theField9[FIELD9_SIZE+1];
119  char theField10[FIELD10_SIZE+1];
120  char theField11[FIELD11_SIZE+1];
121  char theField12[FIELD12_SIZE+1];
122  char theField13[FIELD13_SIZE+1];
123  char theField14[FIELD14_SIZE+1];
124 
127 };
128 
129 #endif
virtual std::ostream & print(std::ostream &out) const
Outputs theErrorStatus as an ossimErrorCode and an ossimString.
std::basic_istream< char > istream
Base class for char input streams.
Definition: ossimIosFwd.h:20
friend OSSIMDLLEXPORT std::ostream & operator<<(std::ostream &out, const ossimErrorStatusInterface &obj)
#define OSSIM_DLL
long long ossim_int64
ossim_int32 theStartOffset
Definition: ossimDtedHdr.h:125
ossim_int32 theStopOffset
Definition: ossimDtedHdr.h:126
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23
int ossim_int32