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

#include <ossimNitfCsdidaTag.h>

Inheritance diagram for ossimNitfCsdidaTag:
ossimNitfRegisteredTag ossimObject ossimPropertyInterface ossimReferenced

Public Member Functions

 ossimNitfCsdidaTag ()
 default constructor More...
 
virtual ~ossimNitfCsdidaTag ()
 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 theDay [3]
 FIELD: DAY. More...
 
char theMonth [4]
 FIELD: MONTH. More...
 
char theYear [5]
 FIELD: YEAR. More...
 
char thePlatformCode [3]
 FIELD: PLATFORM CODE. More...
 
char theVehicleId [3]
 FIELD: VEHICLE ID. More...
 
char thePass [3]
 FIELD: PASS. More...
 
char theOperation [4]
 FIELD: OPERATION. More...
 
char theSensorId [3]
 FIELD: SENSOR_ID. More...
 
char theProductId [3]
 FIELD: PRODUCT_ID. More...
 
char theReservedField1 [5]
 FIELD: Reserved. More...
 
char theTime [15]
 FIELD: TIME. More...
 
char theProcessTime [15]
 FIELD: PROCESS_TIME. More...
 
char theReservedField2 [3]
 FIELD: Reserved. More...
 
char theReservedField3 [3]
 FIELD: Reserved. More...
 
char theReservedField4 [1]
 FIELD: Reserved. More...
 
char theReservedField5 [1]
 FIELD: Reserved. More...
 
char theSoftwareVersionNumber [11]
 FIELD: SOFTWARE_VERSION_NUMBER. 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 ossimNitfCsdidaTag.h.

Constructor & Destructor Documentation

◆ ossimNitfCsdidaTag()

ossimNitfCsdidaTag::ossimNitfCsdidaTag ( )

default constructor

Definition at line 28 of file ossimNitfCsdidaTag.cpp.

References clearFields().

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

◆ ~ossimNitfCsdidaTag()

ossimNitfCsdidaTag::~ossimNitfCsdidaTag ( )
virtual

destructor

Definition at line 34 of file ossimNitfCsdidaTag.cpp.

35 {
36 }

Member Function Documentation

◆ clearFields()

void ossimNitfCsdidaTag::clearFields ( )
virtual

Method to clear all fields including null terminating.

Definition at line 82 of file ossimNitfCsdidaTag.cpp.

References theDay, theMonth, theOperation, thePass, thePlatformCode, theProcessTime, theProductId, theReservedField1, theReservedField2, theReservedField3, theReservedField4, theReservedField5, theSensorId, theSoftwareVersionNumber, theTime, theVehicleId, and theYear.

Referenced by ossimNitfCsdidaTag(), and parseStream().

83 {
84  // BCS-N's to '0's, BCS-A's to ' '(spaces)
85 
86  memset(theDay, '0', 2);
87  memset(theMonth, ' ', 3);
88  memset(theYear, '0', 4);
89  memset(thePlatformCode, ' ', 2);
90  memset(theVehicleId, '0', 2);
91  memset(thePass, '0', 2);
92  memset(theOperation, '0', 3);
93  memset(theSensorId, ' ', 2);
94  memset(theProductId, ' ', 2);
95  memcpy(theReservedField1, "00 ", 4);
96  memset(theTime, '0', 14);
97  memset(theProcessTime, '0', 14);
98  memcpy(theReservedField2, "00", 2);
99  memcpy(theReservedField3, "01", 2);
100  memcpy(theReservedField4, "N", 1);
101  memcpy(theReservedField5, "N", 1);
102  memset(theSoftwareVersionNumber, ' ', 10);
103 
104  theDay[2] = '\0';
105  theMonth[3] = '\0';
106  theYear[4] = '\0';
107  thePlatformCode[2] = '\0';
108  theVehicleId[2] = '\0';
109  thePass[2] = '\0';
110  theOperation[3] = '\0';
111  theSensorId[2] = '\0';
112  theProductId[2] = '\0';
113  theReservedField1[4] = '\0';
114  theTime[14] = '\0';
115  theProcessTime[14] = '\0';
116  theReservedField2[2] = '\0';
117  theReservedField3[2] = '\0';
118  theReservedField4[0] = '\0';
119  theReservedField5[0] = '\0';
120  theSoftwareVersionNumber[10] = '\0';
121 }
char theReservedField1[5]
FIELD: Reserved.
char theProductId[3]
FIELD: PRODUCT_ID.
char theReservedField5[1]
FIELD: Reserved.
char theYear[5]
FIELD: YEAR.
char theVehicleId[3]
FIELD: VEHICLE ID.
char theDay[3]
FIELD: DAY.
char thePass[3]
FIELD: PASS.
char theProcessTime[15]
FIELD: PROCESS_TIME.
char theReservedField4[1]
FIELD: Reserved.
char theReservedField2[3]
FIELD: Reserved.
char theSensorId[3]
FIELD: SENSOR_ID.
char theOperation[4]
FIELD: OPERATION.
char theReservedField3[3]
FIELD: Reserved.
char theSoftwareVersionNumber[11]
FIELD: SOFTWARE_VERSION_NUMBER.
char theTime[15]
FIELD: TIME.
char thePlatformCode[3]
FIELD: PLATFORM CODE.
char theMonth[4]
FIELD: MONTH.

◆ parseStream()

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

Method to parse data from stream.

Definition at line 38 of file ossimNitfCsdidaTag.cpp.

References clearFields(), theDay, theMonth, theOperation, thePass, thePlatformCode, theProcessTime, theProductId, theReservedField1, theReservedField2, theReservedField3, theReservedField4, theReservedField5, theSensorId, theSoftwareVersionNumber, theTime, theVehicleId, and theYear.

39 {
40  clearFields();
41 
42  in.read(theDay, 2);
43  in.read(theMonth, 3);
44  in.read(theYear, 4);
45  in.read(thePlatformCode, 2);
46  in.read(theVehicleId, 2);
47  in.read(thePass, 2);
48  in.read(theOperation, 3);
49  in.read(theSensorId, 2);
50  in.read(theProductId, 2);
51  in.read(theReservedField1, 4);
52  in.read(theTime, 14);
53  in.read(theProcessTime, 14);
54  in.read(theReservedField2, 2);
55  in.read(theReservedField3, 2);
56  in.read(theReservedField4, 1);
57  in.read(theReservedField5, 1);
58  in.read(theSoftwareVersionNumber, 10);
59 }
char theReservedField1[5]
FIELD: Reserved.
char theProductId[3]
FIELD: PRODUCT_ID.
virtual void clearFields()
Method to clear all fields including null terminating.
char theReservedField5[1]
FIELD: Reserved.
char theYear[5]
FIELD: YEAR.
char theVehicleId[3]
FIELD: VEHICLE ID.
char theDay[3]
FIELD: DAY.
char thePass[3]
FIELD: PASS.
char theProcessTime[15]
FIELD: PROCESS_TIME.
char theReservedField4[1]
FIELD: Reserved.
char theReservedField2[3]
FIELD: Reserved.
char theSensorId[3]
FIELD: SENSOR_ID.
char theOperation[4]
FIELD: OPERATION.
char theReservedField3[3]
FIELD: Reserved.
char theSoftwareVersionNumber[11]
FIELD: SOFTWARE_VERSION_NUMBER.
char theTime[15]
FIELD: TIME.
char thePlatformCode[3]
FIELD: PLATFORM CODE.
char theMonth[4]
FIELD: MONTH.

◆ print()

std::ostream & ossimNitfCsdidaTag::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 123 of file ossimNitfCsdidaTag.cpp.

References ossimNitfRegisteredTag::getTagLength(), ossimNitfRegisteredTag::getTagName(), theDay, theMonth, theOperation, thePass, thePlatformCode, theProcessTime, theProductId, theSensorId, theSoftwareVersionNumber, theTime, theVehicleId, and theYear.

125 {
126  std::string pfx = prefix;
127  pfx += getTagName();
128  pfx += ".";
129 
130  out << setiosflags(std::ios::left)
131  << pfx << std::setw(24) << "CETAG:"
132  << getTagName() << "\n"
133  << pfx << std::setw(24) << "CEL:" << getTagLength() << "\n"
134  << pfx << std::setw(24) << "DAY:" << theDay << "\n"
135  << pfx << std::setw(24) << "MONTH:" << theMonth << "\n"
136  << pfx << std::setw(24) << "YEAR:" << theYear << "\n"
137  << pfx << std::setw(24) << "PLATFORM_CODE:" << thePlatformCode << "\n"
138  << pfx << std::setw(24) << "VEHICLE_ID:" << theVehicleId << "\n"
139  << pfx << std::setw(24) << "PASS:" << thePass << "\n"
140  << pfx << std::setw(24) << "OPERATION:" << theOperation << "\n"
141  << pfx << std::setw(24) << "SENSOR_ID:" << theSensorId << "\n"
142  << pfx << std::setw(24) << "PRODUCT_ID:" << theProductId << "\n"
143  << pfx << std::setw(24) << "TIME:" << theTime << "\n"
144  << pfx << std::setw(24) << "PROCESS_TIME:" << theProcessTime << "\n"
145  << pfx << std::setw(24) << "SOFTWARE_VERSION_NUMBER:"
146  << theSoftwareVersionNumber << "\n";
147 
148  return out;
149 }
virtual const std::string & getTagName() const
This will return the name of the registered tag for this user defined header.
char theProductId[3]
FIELD: PRODUCT_ID.
char theYear[5]
FIELD: YEAR.
char theVehicleId[3]
FIELD: VEHICLE ID.
char theDay[3]
FIELD: DAY.
char thePass[3]
FIELD: PASS.
char theProcessTime[15]
FIELD: PROCESS_TIME.
virtual ossim_uint32 getTagLength() const
Returns the length in bytes of the tag from the CEL or REL field.
char theSensorId[3]
FIELD: SENSOR_ID.
char theOperation[4]
FIELD: OPERATION.
char theSoftwareVersionNumber[11]
FIELD: SOFTWARE_VERSION_NUMBER.
char theTime[15]
FIELD: TIME.
char thePlatformCode[3]
FIELD: PLATFORM CODE.
char theMonth[4]
FIELD: MONTH.

◆ writeStream()

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

Method to write data to stream.

Definition at line 61 of file ossimNitfCsdidaTag.cpp.

References theDay, theMonth, theOperation, thePass, thePlatformCode, theProcessTime, theProductId, theReservedField1, theReservedField2, theReservedField3, theReservedField4, theReservedField5, theSensorId, theSoftwareVersionNumber, theTime, theVehicleId, and theYear.

62 {
63  out.write(theDay, 2);
64  out.write(theMonth, 3);
65  out.write(theYear, 4);
66  out.write(thePlatformCode, 2);
67  out.write(theVehicleId, 2);
68  out.write(thePass, 2);
69  out.write(theOperation, 3);
70  out.write(theSensorId, 2);
71  out.write(theProductId, 2);
72  out.write(theReservedField1, 4);
73  out.write(theTime, 14);
74  out.write(theProcessTime, 14);
75  out.write(theReservedField2, 2);
76  out.write(theReservedField3, 2);
77  out.write(theReservedField4, 1);
78  out.write(theReservedField5, 1);
79  out.write(theSoftwareVersionNumber, 10);
80 }
char theReservedField1[5]
FIELD: Reserved.
char theProductId[3]
FIELD: PRODUCT_ID.
char theReservedField5[1]
FIELD: Reserved.
char theYear[5]
FIELD: YEAR.
char theVehicleId[3]
FIELD: VEHICLE ID.
char theDay[3]
FIELD: DAY.
char thePass[3]
FIELD: PASS.
char theProcessTime[15]
FIELD: PROCESS_TIME.
char theReservedField4[1]
FIELD: Reserved.
char theReservedField2[3]
FIELD: Reserved.
char theSensorId[3]
FIELD: SENSOR_ID.
char theOperation[4]
FIELD: OPERATION.
char theReservedField3[3]
FIELD: Reserved.
char theSoftwareVersionNumber[11]
FIELD: SOFTWARE_VERSION_NUMBER.
char theTime[15]
FIELD: TIME.
char thePlatformCode[3]
FIELD: PLATFORM CODE.
char theMonth[4]
FIELD: MONTH.

Member Data Documentation

◆ theDay

char ossimNitfCsdidaTag::theDay[3]
protected

FIELD: DAY.

2 byte field BCS-N

01 TO 31 (UTC)

Definition at line 58 of file ossimNitfCsdidaTag.h.

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

◆ theMonth

char ossimNitfCsdidaTag::theMonth[4]
protected

FIELD: MONTH.

3 byte field BCS-A

JAN to DEC (UTC)

Definition at line 67 of file ossimNitfCsdidaTag.h.

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

◆ theOperation

char ossimNitfCsdidaTag::theOperation[4]
protected

FIELD: OPERATION.

3 byte field BCS-N

001 to 999

Definition at line 113 of file ossimNitfCsdidaTag.h.

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

◆ thePass

char ossimNitfCsdidaTag::thePass[3]
protected

FIELD: PASS.

2 byte field BCS-N

01 to 99

Definition at line 104 of file ossimNitfCsdidaTag.h.

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

◆ thePlatformCode

char ossimNitfCsdidaTag::thePlatformCode[3]
protected

FIELD: PLATFORM CODE.

2 byte field BCS-A

QB, IK, OV, WV ...

Definition at line 86 of file ossimNitfCsdidaTag.h.

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

◆ theProcessTime

char ossimNitfCsdidaTag::theProcessTime[15]
protected

FIELD: PROCESS_TIME.

14 byte field BCS-N

Image start time (UTC) YYYYMMDDhhmmss

Definition at line 160 of file ossimNitfCsdidaTag.h.

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

◆ theProductId

char ossimNitfCsdidaTag::theProductId[3]
protected

FIELD: PRODUCT_ID.

2 byte field BCS-A

See table 2.1-7

Definition at line 132 of file ossimNitfCsdidaTag.h.

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

◆ theReservedField1

char ossimNitfCsdidaTag::theReservedField1[5]
protected

FIELD: Reserved.

4 bytes BCS-A

fill "00 "

Definition at line 141 of file ossimNitfCsdidaTag.h.

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

◆ theReservedField2

char ossimNitfCsdidaTag::theReservedField2[3]
protected

FIELD: Reserved.

2 bytes BCS-N

Fill "00"

Definition at line 168 of file ossimNitfCsdidaTag.h.

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

◆ theReservedField3

char ossimNitfCsdidaTag::theReservedField3[3]
protected

FIELD: Reserved.

2 bytes BCS-N

Fill "01"

Definition at line 177 of file ossimNitfCsdidaTag.h.

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

◆ theReservedField4

char ossimNitfCsdidaTag::theReservedField4[1]
protected

FIELD: Reserved.

1 byte BCS-A

Fill "N"

Definition at line 186 of file ossimNitfCsdidaTag.h.

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

◆ theReservedField5

char ossimNitfCsdidaTag::theReservedField5[1]
protected

FIELD: Reserved.

1 byte BCS-A

BCS-A "N"

Definition at line 195 of file ossimNitfCsdidaTag.h.

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

◆ theSensorId

char ossimNitfCsdidaTag::theSensorId[3]
protected

FIELD: SENSOR_ID.

2 byte field BCS-A

AA = pan only, GA = multispectral and pan sharpened only, NA = panchroomatic & multispectral together.

Definition at line 123 of file ossimNitfCsdidaTag.h.

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

◆ theSoftwareVersionNumber

char ossimNitfCsdidaTag::theSoftwareVersionNumber[11]
protected

FIELD: SOFTWARE_VERSION_NUMBER.

10 byte field BCS-A

Software version used.

Definition at line 204 of file ossimNitfCsdidaTag.h.

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

◆ theTime

char ossimNitfCsdidaTag::theTime[15]
protected

FIELD: TIME.

14 byte field BCS-N

Image start time (UTC) YYYYMMDDhhmmss Corresponds to ACQUISITION_DATE in STDI-0002

Definition at line 151 of file ossimNitfCsdidaTag.h.

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

◆ theVehicleId

char ossimNitfCsdidaTag::theVehicleId[3]
protected

FIELD: VEHICLE ID.

2 byte field BCS-N

00 TO 99

Definition at line 95 of file ossimNitfCsdidaTag.h.

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

◆ theYear

char ossimNitfCsdidaTag::theYear[5]
protected

FIELD: YEAR.

4 byte field BCS-N

0000 to 9999 (UTC)

Definition at line 77 of file ossimNitfCsdidaTag.h.

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


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