OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Protected Attributes | List of all members
ossimNitfCscrnaTag Class Reference

#include <ossimNitfCscrnaTag.h>

Inheritance diagram for ossimNitfCscrnaTag:
ossimNitfRegisteredTag ossimObject ossimPropertyInterface ossimReferenced

Public Member Functions

 ossimNitfCscrnaTag ()
 default constructor More...
 
virtual ~ossimNitfCscrnaTag ()
 destructor More...
 
virtual void parseStream (std::istream &in)
 Method to parse data from stream. More...
 
virtual void writeStream (std::ostream &out)
 Method to write data to stream. More...
 
virtual void clearFields ()
 Method to clear all fields including null terminating. More...
 
virtual std::ostream & print (std::ostream &out, const std::string &prefix) const
 Print method that outputs a key/value type format adding prefix to keys. More...
 
- Public Member Functions inherited from ossimNitfRegisteredTag
 ossimNitfRegisteredTag ()
 default constructor More...
 
 ossimNitfRegisteredTag (const std::string &tagName, ossim_uint32 tagLength)
 Constructor that takes name and size. More...
 
virtual ~ossimNitfRegisteredTag ()
 destructor More...
 
virtual std::string getRegisterTagName () const
 This will return the name of the registered tag for this user defined header. More...
 
virtual const std::string & getTagName () const
 This will return the name of the registered tag for this user defined header. More...
 
virtual void setTagName (const std::string &tagName)
 
virtual ossim_uint32 getSizeInBytes () const
 Returns the length in bytes of the tag from the CEL or REL field. More...
 
virtual ossim_uint32 getTagLength () const
 Returns the length in bytes of the tag from the CEL or REL field. More...
 
virtual void setTagLength (ossim_uint32 length)
 Set the tag length. More...
 
virtual void parseStream (ossim::istream &in)=0
 This will allow the user defined data to parse the stream. More...
 
virtual void writeStream (ossim::ostream &out)=0
 
virtual void setProperty (ossimRefPtr< ossimProperty > property)
 
virtual ossimRefPtr< ossimPropertygetProperty (const ossimString &name) const
 
virtual void getPropertyNames (std::vector< ossimString > &propertyNames) const
 
virtual void getMetadata (ossimKeywordlist &kwl, const char *prefix=0) const
 Default interface to populate keyword list with metadata. More...
 
virtual bool saveState (ossimKeywordlist &kwl, const ossimString &prefix) const
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimObjectdup () const
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getDescription () const
 
virtual ossimString getClassName () const
 
virtual RTTItypeid getType () const
 
virtual bool canCastTo (ossimObject *obj) const
 
virtual bool canCastTo (const RTTItypeid &id) const
 
virtual bool canCastTo (const ossimString &parentClassName) const
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 
virtual std::ostream & print (std::ostream &out) const
 Generic print method. More...
 
virtual bool isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
 
virtual void accept (ossimVisitor &visitor)
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 
- Public Member Functions inherited from ossimPropertyInterface
 ossimPropertyInterface ()
 
virtual ~ossimPropertyInterface ()
 
virtual void setProperty (const ossimString &name, const ossimString &value)
 
virtual ossimString getPropertyValueAsString (const ossimString &name) const
 
void getPropertyList (std::vector< ossimRefPtr< ossimProperty > > &propertyList) const
 
void setProperties (std::vector< ossimRefPtr< ossimProperty > > &propertyList)
 

Protected Attributes

char thePredictedCornerFlag [2]
 FIELD: PREDICT_CORNERS. More...
 
char theUlLat [10]
 FIELD: ULCRN_LAT. More...
 
char theUlLon [11]
 FIELD: ULCRN_LON. More...
 
char theUlHt [9]
 FIELD: ULCRN_HT. More...
 
char theUrLat [10]
 FIELD: URCRN_LAT. More...
 
char theUrLon [11]
 FIELD: URCRN_LON. More...
 
char theUrHt [9]
 FIELD: URCRN_HT. More...
 
char theLrLat [10]
 FIELD: LRCRN_LAT. More...
 
char theLrLon [11]
 FIELD: LRCRN_LON. More...
 
char theLrHt [9]
 FIELD: LRCRN_HT. More...
 
char theLlLat [10]
 FIELD: LLCRN_LAT. More...
 
char theLlLon [11]
 FIELD: LLCRN_LON. More...
 
char theLlHt [9]
 FIELD: LLCRN_HT. More...
 
- Protected Attributes inherited from ossimNitfRegisteredTag
std::string m_tagName
 
ossim_uint32 m_tagLength
 

Additional Inherited Members

- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 

Detailed Description

Definition at line 22 of file ossimNitfCscrnaTag.h.

Constructor & Destructor Documentation

◆ ossimNitfCscrnaTag()

ossimNitfCscrnaTag::ossimNitfCscrnaTag ( )

default constructor

Definition at line 28 of file ossimNitfCscrnaTag.cpp.

References clearFields().

29  : ossimNitfRegisteredTag(std::string("CSCRNA"), 109)
30 {
31  clearFields();
32 }
ossimNitfRegisteredTag()
default constructor
virtual void clearFields()
Method to clear all fields including null terminating.

◆ ~ossimNitfCscrnaTag()

ossimNitfCscrnaTag::~ossimNitfCscrnaTag ( )
virtual

destructor

Definition at line 34 of file ossimNitfCscrnaTag.cpp.

35 {
36 }

Member Function Documentation

◆ clearFields()

void ossimNitfCscrnaTag::clearFields ( )
virtual

Method to clear all fields including null terminating.

Definition at line 82 of file ossimNitfCscrnaTag.cpp.

References theLlHt, theLlLat, theLlLon, theLrHt, theLrLat, theLrLon, thePredictedCornerFlag, theUlHt, theUlLat, theUlLon, theUrHt, theUrLat, and theUrLon.

Referenced by ossimNitfCscrnaTag(), and parseStream().

83 {
84  // BCS-N's to '0's, BCS-A's to ' '(spaces)
85  memset(thePredictedCornerFlag, ' ', 1);
86 
87  memset(theUlLat, 0, 9);
88  memset(theUlLon, 0, 10);
89  memset(theUlHt, 0, 8);
90 
91  memset(theUrLat, 0, 9);
92  memset(theUrLon, 0, 10);
93  memset(theUrHt, 0, 8);
94 
95  memset(theLrLat, 0, 9);
96  memset(theLrLon, 0, 10);
97  memset(theLrHt, 0, 8);
98 
99  memset(theLlLat, 0, 9);
100  memset(theLlLon, 0, 10);
101  memset(theLlHt, 0, 8);
102 
103  thePredictedCornerFlag[1] = '\0';
104 
105  theUlLat[9] = '\0';
106  theUlLon[10] = '\0';
107  theUlHt[8] = '\0';
108 
109  theUrLat[9] = '\0';
110  theUrLon[10] = '\0';
111  theUrHt[8] = '\0';
112 
113  theLrLat[9] = '\0';
114  theLrLon[10] = '\0';
115  theLrHt[8] = '\0';
116 
117  theLlLat[9] = '\0';
118  theLlLon[10] = '\0';
119  theLlHt[8] = '\0';
120 }
char theLrLon[11]
FIELD: LRCRN_LON.
char theUlHt[9]
FIELD: ULCRN_HT.
char thePredictedCornerFlag[2]
FIELD: PREDICT_CORNERS.
char theLlLon[11]
FIELD: LLCRN_LON.
char theLlHt[9]
FIELD: LLCRN_HT.
char theUlLat[10]
FIELD: ULCRN_LAT.
char theUlLon[11]
FIELD: ULCRN_LON.
char theUrHt[9]
FIELD: URCRN_HT.
char theUrLat[10]
FIELD: URCRN_LAT.
char theLlLat[10]
FIELD: LLCRN_LAT.
char theUrLon[11]
FIELD: URCRN_LON.
char theLrLat[10]
FIELD: LRCRN_LAT.
char theLrHt[9]
FIELD: LRCRN_HT.

◆ parseStream()

void ossimNitfCscrnaTag::parseStream ( std::istream &  in)
virtual

Method to parse data from stream.

Definition at line 38 of file ossimNitfCscrnaTag.cpp.

References clearFields(), theLlHt, theLlLat, theLlLon, theLrHt, theLrLat, theLrLon, thePredictedCornerFlag, theUlHt, theUlLat, theUlLon, theUrHt, theUrLat, and theUrLon.

39 {
40  clearFields();
41 
42  in.read(thePredictedCornerFlag, 1);
43 
44  in.read(theUlLat, 9);
45  in.read(theUlLon, 10);
46  in.read(theUlHt, 8);
47 
48  in.read(theUrLat, 9);
49  in.read(theUrLon, 10);
50  in.read(theUrHt, 8);
51 
52  in.read(theLrLat, 9);
53  in.read(theLrLon, 10);
54  in.read(theLrHt, 8);
55 
56  in.read(theLlLat, 9);
57  in.read(theLlLon, 10);
58  in.read(theLlHt, 8);
59 }
char theLrLon[11]
FIELD: LRCRN_LON.
char theUlHt[9]
FIELD: ULCRN_HT.
char thePredictedCornerFlag[2]
FIELD: PREDICT_CORNERS.
char theLlLon[11]
FIELD: LLCRN_LON.
char theLlHt[9]
FIELD: LLCRN_HT.
char theUlLat[10]
FIELD: ULCRN_LAT.
char theUlLon[11]
FIELD: ULCRN_LON.
virtual void clearFields()
Method to clear all fields including null terminating.
char theUrHt[9]
FIELD: URCRN_HT.
char theUrLat[10]
FIELD: URCRN_LAT.
char theLlLat[10]
FIELD: LLCRN_LAT.
char theUrLon[11]
FIELD: URCRN_LON.
char theLrLat[10]
FIELD: LRCRN_LAT.
char theLrHt[9]
FIELD: LRCRN_HT.

◆ print()

std::ostream & ossimNitfCscrnaTag::print ( std::ostream &  out,
const std::string &  prefix 
) const
virtual

Print method that outputs a key/value type format adding prefix to keys.

Parameters
outStream to output to.
prefixPrefix added to key like "image0.";

Reimplemented from ossimNitfRegisteredTag.

Definition at line 122 of file ossimNitfCscrnaTag.cpp.

References ossimNitfRegisteredTag::getTagLength(), ossimNitfRegisteredTag::getTagName(), theLlHt, theLlLat, theLlLon, theLrHt, theLrLat, theLrLon, thePredictedCornerFlag, theUlHt, theUlLat, theUlLon, theUrHt, theUrLat, and theUrLon.

124 {
125  std::string pfx = prefix;
126  pfx += getTagName();
127  pfx += ".";
128 
129  out << setiosflags(std::ios::left)
130  << pfx << std::setw(24) << "CETAG:"
131  << getTagName() << "\n"
132  << pfx << std::setw(24) << "CEL:" << getTagLength() << "\n"
133 
134  << pfx << std::setw(24) << "PREDICT_CORNERS:"
135  << thePredictedCornerFlag << "\n"
136 
137  << pfx << std::setw(24) << "ULCRN_LAT:" << theUlLat << "\n"
138  << pfx << std::setw(24) << "ULCRN_LON:" << theUlLon << "\n"
139  << pfx << std::setw(24) << "ULCRN_HT:" << theUlHt << "\n"
140 
141  << pfx << std::setw(24) << "URCRN_LAT:" << theUrLat << "\n"
142  << pfx << std::setw(24) << "URCRN_LON:" << theUrLon << "\n"
143  << pfx << std::setw(24) << "URCRN_HT:" << theUrHt << "\n"
144 
145  << pfx << std::setw(24) << "LRCRN_LAT:" << theLrLat << "\n"
146  << pfx << std::setw(24) << "LRCRN_LON:" << theLrLon << "\n"
147  << pfx << std::setw(24) << "LRCRN_HT:" << theLrHt << "\n"
148 
149  << pfx << std::setw(24) << "LLCRN_LAT:" << theLlLat << "\n"
150  << pfx << std::setw(24) << "LLCRN_LON:" << theLlLon << "\n"
151  << pfx << std::setw(24) << "LLCRN_HT:" << theLlHt << "\n";
152 
153  return out;
154 }
virtual const std::string & getTagName() const
This will return the name of the registered tag for this user defined header.
char theLrLon[11]
FIELD: LRCRN_LON.
char theUlHt[9]
FIELD: ULCRN_HT.
char thePredictedCornerFlag[2]
FIELD: PREDICT_CORNERS.
char theLlLon[11]
FIELD: LLCRN_LON.
char theLlHt[9]
FIELD: LLCRN_HT.
virtual ossim_uint32 getTagLength() const
Returns the length in bytes of the tag from the CEL or REL field.
char theUlLat[10]
FIELD: ULCRN_LAT.
char theUlLon[11]
FIELD: ULCRN_LON.
char theUrHt[9]
FIELD: URCRN_HT.
char theUrLat[10]
FIELD: URCRN_LAT.
char theLlLat[10]
FIELD: LLCRN_LAT.
char theUrLon[11]
FIELD: URCRN_LON.
char theLrLat[10]
FIELD: LRCRN_LAT.
char theLrHt[9]
FIELD: LRCRN_HT.

◆ writeStream()

void ossimNitfCscrnaTag::writeStream ( std::ostream &  out)
virtual

Method to write data to stream.

Definition at line 61 of file ossimNitfCscrnaTag.cpp.

References theLlHt, theLlLat, theLlLon, theLrHt, theLrLat, theLrLon, thePredictedCornerFlag, theUlHt, theUlLat, theUlLon, theUrHt, theUrLat, and theUrLon.

62 {
63  out.write(thePredictedCornerFlag, 1);
64 
65  out.write(theUlLat, 9);
66  out.write(theUlLon, 10);
67  out.write(theUlHt, 8);
68 
69  out.write(theUrLat, 9);
70  out.write(theUrLon, 10);
71  out.write(theUrHt, 8);
72 
73  out.write(theLrLat, 9);
74  out.write(theLrLon, 10);
75  out.write(theLrHt, 8);
76 
77  out.write(theLlLat, 9);
78  out.write(theLlLon, 10);
79  out.write(theLlHt, 8);
80 }
char theLrLon[11]
FIELD: LRCRN_LON.
char theUlHt[9]
FIELD: ULCRN_HT.
char thePredictedCornerFlag[2]
FIELD: PREDICT_CORNERS.
char theLlLon[11]
FIELD: LLCRN_LON.
char theLlHt[9]
FIELD: LLCRN_HT.
char theUlLat[10]
FIELD: ULCRN_LAT.
char theUlLon[11]
FIELD: ULCRN_LON.
char theUrHt[9]
FIELD: URCRN_HT.
char theUrLat[10]
FIELD: URCRN_LAT.
char theLlLat[10]
FIELD: LLCRN_LAT.
char theUrLon[11]
FIELD: URCRN_LON.
char theLrLat[10]
FIELD: LRCRN_LAT.
char theLrHt[9]
FIELD: LRCRN_HT.

Member Data Documentation

◆ theLlHt

char ossimNitfCscrnaTag::theLlHt[9]
protected

FIELD: LLCRN_HT.

8 byte field BCS-N Meters

Height referenced to the reference ellipsoid.

-00610.0 to +10668.0

Definition at line 179 of file ossimNitfCscrnaTag.h.

Referenced by clearFields(), parseStream(), print(), and writeStream().

◆ theLlLat

char ossimNitfCscrnaTag::theLlLat[10]
protected

FIELD: LLCRN_LAT.

9 byte field BCS-N Degrees

-90.000000 ti +90.000000

Definition at line 159 of file ossimNitfCscrnaTag.h.

Referenced by clearFields(), parseStream(), print(), and writeStream().

◆ theLlLon

char ossimNitfCscrnaTag::theLlLon[11]
protected

FIELD: LLCRN_LON.

10 byte field BCS-N Degrees

-179.999999 ti +180.000000

Definition at line 168 of file ossimNitfCscrnaTag.h.

Referenced by clearFields(), parseStream(), print(), and writeStream().

◆ theLrHt

char ossimNitfCscrnaTag::theLrHt[9]
protected

FIELD: LRCRN_HT.

8 byte field BCS-N Meters

Height referenced to the reference ellipsoid.

-00610.0 to +10668.0

Definition at line 150 of file ossimNitfCscrnaTag.h.

Referenced by clearFields(), parseStream(), print(), and writeStream().

◆ theLrLat

char ossimNitfCscrnaTag::theLrLat[10]
protected

FIELD: LRCRN_LAT.

9 byte field BCS-N Degrees

-90.000000 ti +90.000000

Definition at line 130 of file ossimNitfCscrnaTag.h.

Referenced by clearFields(), parseStream(), print(), and writeStream().

◆ theLrLon

char ossimNitfCscrnaTag::theLrLon[11]
protected

FIELD: LRCRN_LON.

10 byte field BCS-N Degrees

-179.999999 ti +180.000000

Definition at line 139 of file ossimNitfCscrnaTag.h.

Referenced by clearFields(), parseStream(), print(), and writeStream().

◆ thePredictedCornerFlag

char ossimNitfCscrnaTag::thePredictedCornerFlag[2]
protected

FIELD: PREDICT_CORNERS.

1 byte field BCS-A

Y = predicted, N = actual

Definition at line 63 of file ossimNitfCscrnaTag.h.

Referenced by clearFields(), parseStream(), print(), and writeStream().

◆ theUlHt

char ossimNitfCscrnaTag::theUlHt[9]
protected

FIELD: ULCRN_HT.

8 byte field BCS-N Meters

Height referenced to the reference ellipsoid.

-00610.0 to +10668.0

Definition at line 92 of file ossimNitfCscrnaTag.h.

Referenced by clearFields(), parseStream(), print(), and writeStream().

◆ theUlLat

char ossimNitfCscrnaTag::theUlLat[10]
protected

FIELD: ULCRN_LAT.

9 byte field BCS-N Degrees

-90.000000 ti +90.000000

Definition at line 72 of file ossimNitfCscrnaTag.h.

Referenced by clearFields(), parseStream(), print(), and writeStream().

◆ theUlLon

char ossimNitfCscrnaTag::theUlLon[11]
protected

FIELD: ULCRN_LON.

10 byte field BCS-N Degrees

-179.999999 ti +180.000000

Definition at line 81 of file ossimNitfCscrnaTag.h.

Referenced by clearFields(), parseStream(), print(), and writeStream().

◆ theUrHt

char ossimNitfCscrnaTag::theUrHt[9]
protected

FIELD: URCRN_HT.

8 byte field BCS-N Meters

Height referenced to the reference ellipsoid.

-00610.0 to +10668.0

Definition at line 121 of file ossimNitfCscrnaTag.h.

Referenced by clearFields(), parseStream(), print(), and writeStream().

◆ theUrLat

char ossimNitfCscrnaTag::theUrLat[10]
protected

FIELD: URCRN_LAT.

9 byte field BCS-N Degrees

-90.000000 ti +90.000000

Definition at line 101 of file ossimNitfCscrnaTag.h.

Referenced by clearFields(), parseStream(), print(), and writeStream().

◆ theUrLon

char ossimNitfCscrnaTag::theUrLon[11]
protected

FIELD: URCRN_LON.

10 byte field BCS-N Degrees

-179.999999 ti +180.000000

Definition at line 110 of file ossimNitfCscrnaTag.h.

Referenced by clearFields(), parseStream(), print(), and writeStream().


The documentation for this class was generated from the following files: