OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimDtedUhl.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 User Header Label
10 // (UHL) of a DTED Level 1 file.
11 //
12 //********************************************************************
13 // $Id: ossimDtedUhl.h 16104 2009-12-17 18:09:59Z gpotts $
14 #ifndef ossimDtedUhl_H
15 #define ossimDtedUhl_H
16 #include <iosfwd>
20 #include <ossim/base/ossimRefPtr.h>
21 #include <ossim/base/ossimIosFwd.h>
22 #include <memory>
23 
24 class ossimProperty;
25 
27 {
28 public:
29  ossimDtedUhl();
30  ossimDtedUhl(std::shared_ptr<ossim::istream>& str, ossim_int64 offset=0);
31 
32  enum
33  {
34  UHL_LENGTH = 80,
35  UHL_LON_ORIGIN = 5,
36  UHL_LAT_ORIGIN = 13,
37  UHL_LON_INTERVAL = 21,
38  UHL_LAT_INTERVAL = 25,
39  UHL_ABSOLUTE_LE = 29,
40  UHL_SECURITY_CODE = 33,
41  UHL_REFERENCE_NUM = 33,
42  UHL_NUM_LON_LINES = 48,
43  UHL_NUM_LAT_LINES = 52,
44  UHL_MULTIPLE_ACC = 56,
45  UHL_RESERVED = 57,
46  FIELD1_SIZE = 3,
47  FIELD2_SIZE = 1,
48  FIELD3_SIZE = 8,
49  FIELD4_SIZE = 8,
50  FIELD5_SIZE = 4,
51  FIELD6_SIZE = 4,
52  FIELD7_SIZE = 4,
53  FIELD8_SIZE = 3,
54  FIELD9_SIZE = 12,
55  FIELD10_SIZE = 4,
56  FIELD11_SIZE = 4,
57  FIELD12_SIZE = 1,
58  FIELD13_SIZE = 24
59  };
60 
61  // The Recognition Sentinel signifies if the UHL record exists.
62  ossimString recognitionSentinel() const;
63 
64  double lonOrigin() const;
65  double latOrigin() const;
66  double lonInterval() const;
67  double latInterval() const;
68  double absoluteLE() const;
69  ossimString securityCode() const;
70  ossim_int32 numLonLines() const;
71  ossim_int32 numLatPoints() const;
72  ossim_int32 mulitpleAccuracy() const;
73  ossim_int32 startOffset() const;
74  ossim_int32 stopOffset() const;
75 
77  const ossimDtedUhl& uhl);
78 
89  const std::string& prefix) const;
90 
91  void parse(std::istream& in);
92 
99  ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
100 
105  void getPropertyNames(std::vector<ossimString>& propertyNames)const;
106 
107 private:
108  // Do not allow...
109  ossimDtedUhl(const ossimDtedUhl& source);
110  const ossimDtedUhl& operator=(const ossimDtedUhl& rhs);
111 
112  double degreesFromString(const char* str) const;
113  double spacingFromString(const char* str) const;
114 
115  char theRecSen[FIELD1_SIZE+1];
116  char theField2[FIELD2_SIZE+1];
117  char theLonOrigin[FIELD3_SIZE+1];
118  char theLatOrigin[FIELD4_SIZE+1];
119  char theLonInterval[FIELD5_SIZE+1];
120  char theLatInterval[FIELD6_SIZE+1];
121  char theAbsoluteLE[FIELD7_SIZE+1];
122  char theSecurityCode[FIELD8_SIZE+1];
123  char theField9[FIELD9_SIZE+1];
124  char theNumLonLines[FIELD10_SIZE+1];
125  char theNumLatPoints[FIELD11_SIZE+1];
126  char theMultipleAccuracy[FIELD12_SIZE+1];
127 
130 };
131 
132 #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
ossim_int32 theStartOffset
Definition: ossimDtedUhl.h:128
friend OSSIMDLLEXPORT std::ostream & operator<<(std::ostream &out, const ossimErrorStatusInterface &obj)
#define OSSIM_DLL
long long ossim_int64
ossim_int32 theStopOffset
Definition: ossimDtedUhl.h:129
std::basic_ostream< char > ostream
Base class for char output streams.
Definition: ossimIosFwd.h:23
int ossim_int32