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

#include <ossimNitfBlockaTag.h>

Inheritance diagram for ossimNitfBlockaTag:
ossimNitfRegisteredTag ossimObject ossimPropertyInterface ossimReferenced

Public Types

enum  {
  BLOCK_INSTANCE_SIZE = 2, N_GRAY_SIZE = 5, L_LINES_SIZE = 5, LAYOVER_ANGLE_SIZE = 3,
  SHADOW_ANGLE_SIZE = 3, FIELD_6_SIZE = 16, FRLC_LOC_SIZE = 21, LRLC_LOC_SIZE = 21,
  LRFC_LOC_SIZE = 21, FRFC_LOC_SIZE = 21, FIELD_11_SIZE = 5
}
 

Public Member Functions

 ossimNitfBlockaTag ()
 default constructor More...
 
virtual void parseStream (ossim::istream &in)
 Parse method. More...
 
virtual void writeStream (ossim::ostream &out)
 Write method. More...
 
virtual void clearFields ()
 Clears all string fields within the record to some default nothingness. 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...
 
void setBlockInstance (ossim_uint32 block)
 
ossimString getBlockInstance () const
 
void setNGray (ossim_uint32 grayCount)
 
ossimString getNGray () const
 
void setLLines (ossim_uint32 lines)
 
ossimString getLLines () const
 
void setLayoverAngle (ossim_uint32 angle)
 
ossimString getLayoverAngle () const
 
void setShadowAngle (ossim_uint32 angle)
 
ossimString getShadowAngle () const
 
void setFrlcLoc (const ossimDpt &pt)
 Convert latitude and logitude to theFrlcLoc string. More...
 
ossimString getFrlcLoc () const
 
void getFrlcLoc (ossimDpt &pt) const
 
void setLrlcLoc (const ossimDpt &pt)
 Convert latitude and logitude to theLrlcLoc string. More...
 
ossimString getLrlcLoc () const
 
void getLrlcLoc (ossimDpt &pt) const
 
void setLrfcLoc (const ossimDpt &pt)
 
Convert latitude and logitude to theLrfcLoc string. More...
 
ossimString getLrfcLoc () const
 
void getLrfcLoc (ossimDpt &pt) const
 
void setFrfcLoc (const ossimDpt &pt)
 Convert latitude and logitude to theFrfcLoc string. More...
 
ossimString getFrfcLoc () const
 
void getFrfcLoc (ossimDpt &pt) const
 
- 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 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 Member Functions

void converLocStringToPt (const ossimString &locationString, ossimDpt &pt) const
 Parses location string and initializes pt with result. More...
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 

Protected Attributes

char theBlockInstance [BLOCK_INSTANCE_SIZE+1]
 FIELD: BLOCK_INSTANCE. More...
 
char theNGray [N_GRAY_SIZE+1]
 FIELD: N_GRAY. More...
 
char theLLines [L_LINES_SIZE+1]
 FIELD: L_LINES. More...
 
char theLayoverAngle [LAYOVER_ANGLE_SIZE+1]
 FIELD: LAYOVER_ANGLE. More...
 
char theShadowAngle [SHADOW_ANGLE_SIZE+1]
 FIELD: SHADOW_ANGLE. More...
 
char theField6 [FIELD_6_SIZE+1]
 FIELD: FIELD_6. More...
 
char theFrlcLoc [FRLC_LOC_SIZE+1]
 FIELD: FRLC_LOC. More...
 
char theLrlcLoc [LRLC_LOC_SIZE+1]
 FIELD: LRLC_LOC. More...
 
char theLrfcLoc [LRFC_LOC_SIZE+1]
 FIELD: LRFC_LOC. More...
 
char theFrfcLoc [FRFC_LOC_SIZE+1]
 FIELD: FRFC_LOC. More...
 
char theField11 [FIELD_11_SIZE+1]
 FIELD: FIELD_11. More...
 
- Protected Attributes inherited from ossimNitfRegisteredTag
std::string m_tagName
 
ossim_uint32 m_tagLength
 

Detailed Description

Definition at line 25 of file ossimNitfBlockaTag.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
BLOCK_INSTANCE_SIZE 
N_GRAY_SIZE 
L_LINES_SIZE 
LAYOVER_ANGLE_SIZE 
SHADOW_ANGLE_SIZE 
FIELD_6_SIZE 
FRLC_LOC_SIZE 
LRLC_LOC_SIZE 
LRFC_LOC_SIZE 
FRFC_LOC_SIZE 
FIELD_11_SIZE 

Definition at line 28 of file ossimNitfBlockaTag.h.

Constructor & Destructor Documentation

◆ ossimNitfBlockaTag()

ossimNitfBlockaTag::ossimNitfBlockaTag ( )

default constructor

Definition at line 29 of file ossimNitfBlockaTag.cpp.

References clearFields().

30  : ossimNitfRegisteredTag(std::string("BLOCKA"), 123)
31 {
32  clearFields();
33 }
virtual void clearFields()
Clears all string fields within the record to some default nothingness.
ossimNitfRegisteredTag()
default constructor

Member Function Documentation

◆ clearFields()

void ossimNitfBlockaTag::clearFields ( )
virtual

Clears all string fields within the record to some default nothingness.

Definition at line 68 of file ossimNitfBlockaTag.cpp.

References BLOCK_INSTANCE_SIZE, FIELD_11_SIZE, FIELD_6_SIZE, FRFC_LOC_SIZE, FRLC_LOC_SIZE, L_LINES_SIZE, LAYOVER_ANGLE_SIZE, LRFC_LOC_SIZE, LRLC_LOC_SIZE, N_GRAY_SIZE, SHADOW_ANGLE_SIZE, theBlockInstance, theField11, theField6, theFrfcLoc, theFrlcLoc, theLayoverAngle, theLLines, theLrfcLoc, theLrlcLoc, theNGray, and theShadowAngle.

Referenced by ossimNitfBlockaTag(), and parseStream().

69 {
71  memset(theNGray, 0, N_GRAY_SIZE);
72  memset(theLLines, 0, L_LINES_SIZE);
73  memset(theLayoverAngle, ' ', LAYOVER_ANGLE_SIZE);
74  memset(theShadowAngle, ' ', SHADOW_ANGLE_SIZE);
75  memset(theField6, ' ', FIELD_6_SIZE);
76  memset(theFrlcLoc, ' ', FRLC_LOC_SIZE);
77  memset(theLrlcLoc, ' ', LRLC_LOC_SIZE);
78  memset(theLrfcLoc, ' ', LRFC_LOC_SIZE);
79  memset(theFrfcLoc, ' ', FRFC_LOC_SIZE);
80  memcpy(theField11, "010.0", FIELD_11_SIZE);
81 
83  theNGray[N_GRAY_SIZE] = '\0';
84  theLLines[L_LINES_SIZE] = '\0';
87  theField6[FIELD_6_SIZE] = '\0';
88  theFrlcLoc[FRLC_LOC_SIZE] = '\0';
89  theLrlcLoc[LRLC_LOC_SIZE] = '\0';
90  theLrfcLoc[LRFC_LOC_SIZE] = '\0';
91  theFrfcLoc[FRFC_LOC_SIZE] = '\0';
92  theField11[FIELD_11_SIZE] = '\0';
93 }
char theFrlcLoc[FRLC_LOC_SIZE+1]
FIELD: FRLC_LOC.
char theFrfcLoc[FRFC_LOC_SIZE+1]
FIELD: FRFC_LOC.
char theNGray[N_GRAY_SIZE+1]
FIELD: N_GRAY.
char theField6[FIELD_6_SIZE+1]
FIELD: FIELD_6.
char theLrlcLoc[LRLC_LOC_SIZE+1]
FIELD: LRLC_LOC.
char theShadowAngle[SHADOW_ANGLE_SIZE+1]
FIELD: SHADOW_ANGLE.
char theLLines[L_LINES_SIZE+1]
FIELD: L_LINES.
char theLayoverAngle[LAYOVER_ANGLE_SIZE+1]
FIELD: LAYOVER_ANGLE.
char theLrfcLoc[LRFC_LOC_SIZE+1]
FIELD: LRFC_LOC.
char theBlockInstance[BLOCK_INSTANCE_SIZE+1]
FIELD: BLOCK_INSTANCE.
char theField11[FIELD_11_SIZE+1]
FIELD: FIELD_11.

◆ converLocStringToPt()

void ossimNitfBlockaTag::converLocStringToPt ( const ossimString locationString,
ossimDpt pt 
) const
protected

Parses location string and initializes pt with result.

Parameters
locationStringString to parse.
ptPoint to initialize.

Definition at line 279 of file ossimNitfBlockaTag.cpp.

References ossimDms::getDegrees(), ossimDms::setDegrees(), ossimString::size(), ossimString::toDouble(), ossimDpt::x, and ossimDpt::y.

Referenced by getFrfcLoc(), getFrlcLoc(), getLrfcLoc(), and getLrlcLoc().

281 {
282  if (locationString.size() != 21) return;
283 
284  std::string s = locationString;
285 
286  std::string lat(s, 0, 10);
287  std::string lon(s, 10, 11);
288 
289  if ( (lat[0] == 'N') || (lat[0] == 'S') )
290  {
291  // Need to enter spaces for ossimDms to parse correctly
292  std::ostringstream latStream;
293  latStream << lat.substr(0, 3) << " " << lat.substr(3, 2)
294  << " " << lat.substr(5);
295  lat = latStream.str();
296 
297  // Use the dms class to parse.
298  ossimDms dms(0.0, true);
299  dms.setDegrees(lat.c_str());
300  pt.y = dms.getDegrees();
301  }
302  else
303  {
304  ossimString os = lat;
305  pt.y = os.toDouble();
306  }
307  if ( (lon[0] == 'E') || (lon[0] == 'W') )
308  {
309  // Need to enter spaces for ossimDms to parse correctly
310  std::ostringstream lonStream;
311  lonStream << lon.substr(0, 4) << " " << lon.substr(4, 2)
312  << " " << lon.substr(6);
313  lon = lonStream.str();
314 
315  // Use the dms class to parse.
316  ossimDms dms(0.0, false);
317  dms.setDegrees(lon.c_str());
318  pt.x = dms.getDegrees();
319  }
320  else
321  {
322  ossimString os = lon;
323  pt.x = os.toDouble();
324  }
325 }
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
double y
Definition: ossimDpt.h:165
std::string::size_type size() const
Definition: ossimString.h:405
double toDouble() const
double x
Definition: ossimDpt.h:164

◆ getBlockInstance()

ossimString ossimNitfBlockaTag::getBlockInstance ( ) const
Returns
theBlockInstance as a string.

Definition at line 145 of file ossimNitfBlockaTag.cpp.

References theBlockInstance.

146 {
148 }
char theBlockInstance[BLOCK_INSTANCE_SIZE+1]
FIELD: BLOCK_INSTANCE.

◆ getFrfcLoc() [1/2]

ossimString ossimNitfBlockaTag::getFrfcLoc ( ) const
Returns
theFrfcLoc as a string.

Definition at line 268 of file ossimNitfBlockaTag.cpp.

References theFrfcLoc.

Referenced by print().

269 {
270  return ossimString(theFrfcLoc);
271 }
char theFrfcLoc[FRFC_LOC_SIZE+1]
FIELD: FRFC_LOC.

◆ getFrfcLoc() [2/2]

void ossimNitfBlockaTag::getFrfcLoc ( ossimDpt pt) const
Parameters
ptGround point to initialize with location.

Definition at line 273 of file ossimNitfBlockaTag.cpp.

References converLocStringToPt(), and theFrfcLoc.

274 {
275  ossimString os = theFrfcLoc;
276  converLocStringToPt(os, pt);
277 }
char theFrfcLoc[FRFC_LOC_SIZE+1]
FIELD: FRFC_LOC.
void converLocStringToPt(const ossimString &locationString, ossimDpt &pt) const
Parses location string and initializes pt with result.

◆ getFrlcLoc() [1/2]

ossimString ossimNitfBlockaTag::getFrlcLoc ( ) const
Returns
theFrlcLoc as a string.

Definition at line 217 of file ossimNitfBlockaTag.cpp.

References theFrlcLoc.

Referenced by print().

218 {
219  return ossimString(theFrlcLoc);
220 }
char theFrlcLoc[FRLC_LOC_SIZE+1]
FIELD: FRLC_LOC.

◆ getFrlcLoc() [2/2]

void ossimNitfBlockaTag::getFrlcLoc ( ossimDpt pt) const
Parameters
ptGround point to initialize with location.

Definition at line 222 of file ossimNitfBlockaTag.cpp.

References converLocStringToPt(), and theFrlcLoc.

223 {
224  ossimString os = theFrlcLoc;
225  converLocStringToPt(os, pt);
226 }
char theFrlcLoc[FRLC_LOC_SIZE+1]
FIELD: FRLC_LOC.
void converLocStringToPt(const ossimString &locationString, ossimDpt &pt) const
Parses location string and initializes pt with result.

◆ getLayoverAngle()

ossimString ossimNitfBlockaTag::getLayoverAngle ( ) const
Returns
theLayoverAngle as a string.

Definition at line 191 of file ossimNitfBlockaTag.cpp.

References theLayoverAngle.

192 {
194 }
char theLayoverAngle[LAYOVER_ANGLE_SIZE+1]
FIELD: LAYOVER_ANGLE.

◆ getLLines()

ossimString ossimNitfBlockaTag::getLLines ( ) const
Returns
theLLines as a string.

Definition at line 176 of file ossimNitfBlockaTag.cpp.

References theLLines.

177 {
178  return ossimString(theLLines);
179 }
char theLLines[L_LINES_SIZE+1]
FIELD: L_LINES.

◆ getLrfcLoc() [1/2]

ossimString ossimNitfBlockaTag::getLrfcLoc ( ) const
Returns
theLrfcLoc as a string.

Definition at line 251 of file ossimNitfBlockaTag.cpp.

References theLrfcLoc.

Referenced by print().

252 {
253  return ossimString(theLrfcLoc);
254 }
char theLrfcLoc[LRFC_LOC_SIZE+1]
FIELD: LRFC_LOC.

◆ getLrfcLoc() [2/2]

void ossimNitfBlockaTag::getLrfcLoc ( ossimDpt pt) const
Parameters
ptGround point to initialize with location.

Definition at line 256 of file ossimNitfBlockaTag.cpp.

References converLocStringToPt(), and theLrfcLoc.

257 {
258  ossimString os = theLrfcLoc;
259  converLocStringToPt(os, pt);
260 }
char theLrfcLoc[LRFC_LOC_SIZE+1]
FIELD: LRFC_LOC.
void converLocStringToPt(const ossimString &locationString, ossimDpt &pt) const
Parses location string and initializes pt with result.

◆ getLrlcLoc() [1/2]

ossimString ossimNitfBlockaTag::getLrlcLoc ( ) const
Returns
theLrlcLoc as a string.

Definition at line 234 of file ossimNitfBlockaTag.cpp.

References theLrlcLoc.

Referenced by print().

235 {
236  return ossimString(theLrlcLoc);
237 }
char theLrlcLoc[LRLC_LOC_SIZE+1]
FIELD: LRLC_LOC.

◆ getLrlcLoc() [2/2]

void ossimNitfBlockaTag::getLrlcLoc ( ossimDpt pt) const
Parameters
ptGround point to initialize with location.

Definition at line 239 of file ossimNitfBlockaTag.cpp.

References converLocStringToPt(), and theLrlcLoc.

240 {
241  ossimString os = theLrlcLoc;
242  converLocStringToPt(os, pt);
243 }
char theLrlcLoc[LRLC_LOC_SIZE+1]
FIELD: LRLC_LOC.
void converLocStringToPt(const ossimString &locationString, ossimDpt &pt) const
Parses location string and initializes pt with result.

◆ getNGray()

ossimString ossimNitfBlockaTag::getNGray ( ) const
Returns
theNGray as a string.

Definition at line 161 of file ossimNitfBlockaTag.cpp.

References theNGray.

162 {
163  return ossimString(theNGray);
164 }
char theNGray[N_GRAY_SIZE+1]
FIELD: N_GRAY.

◆ getShadowAngle()

ossimString ossimNitfBlockaTag::getShadowAngle ( ) const
Returns
theLayoverAngle as a string.

Definition at line 206 of file ossimNitfBlockaTag.cpp.

References theShadowAngle.

207 {
208  return ossimString(theShadowAngle);
209 }
char theShadowAngle[SHADOW_ANGLE_SIZE+1]
FIELD: SHADOW_ANGLE.

◆ parseStream()

void ossimNitfBlockaTag::parseStream ( ossim::istream in)
virtual

Parse method.

Parameters
inStream to parse.

Implements ossimNitfRegisteredTag.

Definition at line 35 of file ossimNitfBlockaTag.cpp.

References BLOCK_INSTANCE_SIZE, clearFields(), FIELD_11_SIZE, FIELD_6_SIZE, FRFC_LOC_SIZE, FRLC_LOC_SIZE, L_LINES_SIZE, LAYOVER_ANGLE_SIZE, LRFC_LOC_SIZE, LRLC_LOC_SIZE, N_GRAY_SIZE, SHADOW_ANGLE_SIZE, theBlockInstance, theField11, theField6, theFrfcLoc, theFrlcLoc, theLayoverAngle, theLLines, theLrfcLoc, theLrlcLoc, theNGray, and theShadowAngle.

36 {
37  clearFields();
38 
40  in.read(theNGray, N_GRAY_SIZE);
41  in.read(theLLines, L_LINES_SIZE);
44  in.read(theField6, FIELD_6_SIZE);
45  in.read(theFrlcLoc, FRLC_LOC_SIZE);
46  in.read(theLrlcLoc, LRLC_LOC_SIZE);
47  in.read(theLrfcLoc, LRFC_LOC_SIZE);
48  in.read(theFrfcLoc, FRFC_LOC_SIZE);
49  in.read(theField11, FIELD_11_SIZE);
50 
51 }
char theFrlcLoc[FRLC_LOC_SIZE+1]
FIELD: FRLC_LOC.
char theFrfcLoc[FRFC_LOC_SIZE+1]
FIELD: FRFC_LOC.
char theNGray[N_GRAY_SIZE+1]
FIELD: N_GRAY.
virtual void clearFields()
Clears all string fields within the record to some default nothingness.
char theField6[FIELD_6_SIZE+1]
FIELD: FIELD_6.
char theLrlcLoc[LRLC_LOC_SIZE+1]
FIELD: LRLC_LOC.
char theShadowAngle[SHADOW_ANGLE_SIZE+1]
FIELD: SHADOW_ANGLE.
char theLLines[L_LINES_SIZE+1]
FIELD: L_LINES.
char theLayoverAngle[LAYOVER_ANGLE_SIZE+1]
FIELD: LAYOVER_ANGLE.
char theLrfcLoc[LRFC_LOC_SIZE+1]
FIELD: LRFC_LOC.
char theBlockInstance[BLOCK_INSTANCE_SIZE+1]
FIELD: BLOCK_INSTANCE.
char theField11[FIELD_11_SIZE+1]
FIELD: FIELD_11.

◆ print()

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

References getFrfcLoc(), getFrlcLoc(), getLrfcLoc(), getLrlcLoc(), ossimNitfRegisteredTag::getTagLength(), ossimNitfRegisteredTag::getTagName(), theBlockInstance, theField11, theField6, theFrfcLoc, theFrlcLoc, theLayoverAngle, theLLines, theLrfcLoc, theLrlcLoc, theNGray, and theShadowAngle.

97 {
98  std::string pfx = prefix;
99  pfx += getTagName();
100  pfx += ".";
101 
102  // Grab the corners parsed into points.
103  ossimDpt ulPt;
104  ossimDpt urPt;
105  ossimDpt lrPt;
106  ossimDpt llPt;
107  getFrfcLoc(ulPt);
108  getFrlcLoc(urPt);
109  getLrlcLoc(lrPt);
110  getLrfcLoc(llPt);
111 
112  out << setiosflags(ios::left)
113  << pfx << std::setw(24) << "CETAG:" << getTagName() << "\n"
114  << pfx << std::setw(24) << "CEL:" << getTagLength() << "\n"
115  << pfx << std::setw(24) << "BLOCK_INSTANCE:" << theBlockInstance << "\n"
116  << pfx << std::setw(24) << "N_GRAY:" << theNGray << "\n"
117  << pfx << std::setw(24) << "L_LINES:" << theLLines << "\n"
118  << pfx << std::setw(24) << "LAYOVER_ANGLE:" << theLayoverAngle << "\n"
119  << pfx << std::setw(24) << "SHADOW_ANGLE:" << theShadowAngle << "\n"
120  << pfx << std::setw(24) << "FIELD_6:" << theField6 << "\n"
121  << pfx << std::setw(24) << "FRLC_LOC:" << theFrlcLoc << "\n"
122  << pfx << std::setw(24) << "LRLC_LOC:" << theLrlcLoc << "\n"
123  << pfx << std::setw(24) << "LRFC_LOC:" << theLrfcLoc << "\n"
124  << pfx << std::setw(24) << "FRFC_LOC:" << theFrfcLoc << "\n"
125  << pfx << std::setw(24) << "FIELD_11:" << theField11 << "\n"
126  << pfx << std::setw(24) << "upper left:" << ulPt << "\n"
127  << pfx << std::setw(24) << "upper right:" << urPt << "\n"
128  << pfx << std::setw(24) << "lower right:" << lrPt << "\n"
129  << pfx << std::setw(24) << "lower left:" << llPt << "\n";
130 
131  return out;
132 }
virtual const std::string & getTagName() const
This will return the name of the registered tag for this user defined header.
char theFrlcLoc[FRLC_LOC_SIZE+1]
FIELD: FRLC_LOC.
char theFrfcLoc[FRFC_LOC_SIZE+1]
FIELD: FRFC_LOC.
char theNGray[N_GRAY_SIZE+1]
FIELD: N_GRAY.
ossimString getFrlcLoc() const
ossimString getFrfcLoc() const
char theField6[FIELD_6_SIZE+1]
FIELD: FIELD_6.
char theLrlcLoc[LRLC_LOC_SIZE+1]
FIELD: LRLC_LOC.
char theShadowAngle[SHADOW_ANGLE_SIZE+1]
FIELD: SHADOW_ANGLE.
char theLLines[L_LINES_SIZE+1]
FIELD: L_LINES.
ossimString getLrfcLoc() const
virtual ossim_uint32 getTagLength() const
Returns the length in bytes of the tag from the CEL or REL field.
char theLayoverAngle[LAYOVER_ANGLE_SIZE+1]
FIELD: LAYOVER_ANGLE.
char theLrfcLoc[LRFC_LOC_SIZE+1]
FIELD: LRFC_LOC.
ossimString getLrlcLoc() const
char theBlockInstance[BLOCK_INSTANCE_SIZE+1]
FIELD: BLOCK_INSTANCE.
char theField11[FIELD_11_SIZE+1]
FIELD: FIELD_11.

◆ setBlockInstance()

void ossimNitfBlockaTag::setBlockInstance ( ossim_uint32  block)
Parameters
blocknumber to set block instance to. Valid range 01 to 99.

Definition at line 134 of file ossimNitfBlockaTag.cpp.

References BLOCK_INSTANCE_SIZE, ossimString::c_str(), ossimNitfCommon::convertToIntString(), and theBlockInstance.

Referenced by ossimNitfWriterBase::addBlockaTag().

135 {
136  if ( (block > 0) && (block < 100) )
137  {
138  ossimString os =
142  }
143 }
char theBlockInstance[BLOCK_INSTANCE_SIZE+1]
FIELD: BLOCK_INSTANCE.
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396
static ossimString convertToIntString(ossim_int32 aValue, ossim_uint32 size)
Just like convertToUIntString only takes a signed value.

◆ setFrfcLoc()

void ossimNitfBlockaTag::setFrfcLoc ( const ossimDpt pt)

Convert latitude and logitude to theFrfcLoc string.

Parameters
ptGround point of first row, first column.
longitudeLongitude portion in decimal degrees.

Definition at line 262 of file ossimNitfBlockaTag.cpp.

References ossimString::c_str(), ossimNitfCommon::convertToDdLatLonLocString(), FRFC_LOC_SIZE, and theFrfcLoc.

Referenced by ossimNitfWriterBase::addBlockaTag().

263 {
265  memcpy(theFrfcLoc, os.c_str(), FRFC_LOC_SIZE);
266 }
char theFrfcLoc[FRFC_LOC_SIZE+1]
FIELD: FRFC_LOC.
static ossimString convertToDdLatLonLocString(const ossimDpt &pt, ossim_uint32 precision)
Converts pt to a decimal degrees latitude longitude location string.
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396

◆ setFrlcLoc()

void ossimNitfBlockaTag::setFrlcLoc ( const ossimDpt pt)

Convert latitude and logitude to theFrlcLoc string.

Parameters
ptGround point of first row, last column.
longitudeLongitude portion in decimal degrees.

Definition at line 211 of file ossimNitfBlockaTag.cpp.

References ossimString::c_str(), ossimNitfCommon::convertToDdLatLonLocString(), FRLC_LOC_SIZE, and theFrlcLoc.

Referenced by ossimNitfWriterBase::addBlockaTag().

212 {
214  memcpy(theFrlcLoc, os.c_str(), FRLC_LOC_SIZE);
215 }
char theFrlcLoc[FRLC_LOC_SIZE+1]
FIELD: FRLC_LOC.
static ossimString convertToDdLatLonLocString(const ossimDpt &pt, ossim_uint32 precision)
Converts pt to a decimal degrees latitude longitude location string.
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396

◆ setLayoverAngle()

void ossimNitfBlockaTag::setLayoverAngle ( ossim_uint32  angle)
Parameters
angleValue to set theLayoverAngle to.

Valid range: 000 to 359 or spaces

Definition at line 181 of file ossimNitfBlockaTag.cpp.

References ossimString::c_str(), ossimNitfCommon::convertToUIntString(), LAYOVER_ANGLE_SIZE, and theLayoverAngle.

182 {
183  if (angle < 360)
184  {
185  ossimString os =
188  }
189 }
char theLayoverAngle[LAYOVER_ANGLE_SIZE+1]
FIELD: LAYOVER_ANGLE.
static ossimString convertToUIntString(ossim_uint32 aValue, ossim_uint32 size)
This method takes a value and converts to a string of size with with a &#39;0&#39; fill.
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396

◆ setLLines()

void ossimNitfBlockaTag::setLLines ( ossim_uint32  lines)
Parameters
linesNumber of rows.

Valid range: 0 to 99999

Definition at line 166 of file ossimNitfBlockaTag.cpp.

References ossimString::c_str(), ossimNitfCommon::convertToUIntString(), L_LINES_SIZE, and theLLines.

Referenced by ossimNitfWriterBase::addBlockaTag().

167 {
168  if (lines < 100000)
169  {
170  ossimString os =
172  memcpy(theLLines, os.c_str(), L_LINES_SIZE);
173  }
174 }
char theLLines[L_LINES_SIZE+1]
FIELD: L_LINES.
static ossimString convertToUIntString(ossim_uint32 aValue, ossim_uint32 size)
This method takes a value and converts to a string of size with with a &#39;0&#39; fill.
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396

◆ setLrfcLoc()

void ossimNitfBlockaTag::setLrfcLoc ( const ossimDpt pt)


Convert latitude and logitude to theLrfcLoc string.

Parameters
ptGround point of last row, first column.
longitudeLongitude portion in decimal degrees.

Definition at line 245 of file ossimNitfBlockaTag.cpp.

References ossimString::c_str(), ossimNitfCommon::convertToDdLatLonLocString(), LRFC_LOC_SIZE, and theLrfcLoc.

Referenced by ossimNitfWriterBase::addBlockaTag().

246 {
248  memcpy(theLrfcLoc, os.c_str(), LRFC_LOC_SIZE);
249 }
static ossimString convertToDdLatLonLocString(const ossimDpt &pt, ossim_uint32 precision)
Converts pt to a decimal degrees latitude longitude location string.
char theLrfcLoc[LRFC_LOC_SIZE+1]
FIELD: LRFC_LOC.
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396

◆ setLrlcLoc()

void ossimNitfBlockaTag::setLrlcLoc ( const ossimDpt pt)

Convert latitude and logitude to theLrlcLoc string.

Parameters
ptGround point of last row, last column.
longitudeLongitude portion in decimal degrees.

Definition at line 228 of file ossimNitfBlockaTag.cpp.

References ossimString::c_str(), ossimNitfCommon::convertToDdLatLonLocString(), LRLC_LOC_SIZE, and theLrlcLoc.

Referenced by ossimNitfWriterBase::addBlockaTag().

229 {
231  memcpy(theLrlcLoc, os.c_str(), LRLC_LOC_SIZE);
232 }
char theLrlcLoc[LRLC_LOC_SIZE+1]
FIELD: LRLC_LOC.
static ossimString convertToDdLatLonLocString(const ossimDpt &pt, ossim_uint32 precision)
Converts pt to a decimal degrees latitude longitude location string.
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396

◆ setNGray()

void ossimNitfBlockaTag::setNGray ( ossim_uint32  grayCount)
Parameters
grayCountCount of gray fill.

Valid range: 0 to 99999

Definition at line 150 of file ossimNitfBlockaTag.cpp.

References ossimString::c_str(), ossimNitfCommon::convertToUIntString(), N_GRAY_SIZE, and theNGray.

151 {
152  if (grayCount < 100000)
153  {
154  ossimString os =
156  N_GRAY_SIZE);
157  memcpy(theNGray, os.c_str(), N_GRAY_SIZE);
158  }
159 }
char theNGray[N_GRAY_SIZE+1]
FIELD: N_GRAY.
static ossimString convertToUIntString(ossim_uint32 aValue, ossim_uint32 size)
This method takes a value and converts to a string of size with with a &#39;0&#39; fill.
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396

◆ setShadowAngle()

void ossimNitfBlockaTag::setShadowAngle ( ossim_uint32  angle)
Parameters
angleValue to set theLayoverAngle to.

Valid range: 000 to 359 or spaces

Definition at line 196 of file ossimNitfBlockaTag.cpp.

References ossimString::c_str(), ossimNitfCommon::convertToUIntString(), SHADOW_ANGLE_SIZE, and theShadowAngle.

197 {
198  if (angle < 360)
199  {
200  ossimString os =
202  memcpy(theShadowAngle, os.c_str(), SHADOW_ANGLE_SIZE);
203  }
204 }
char theShadowAngle[SHADOW_ANGLE_SIZE+1]
FIELD: SHADOW_ANGLE.
static ossimString convertToUIntString(ossim_uint32 aValue, ossim_uint32 size)
This method takes a value and converts to a string of size with with a &#39;0&#39; fill.
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396

◆ writeStream()

void ossimNitfBlockaTag::writeStream ( ossim::ostream out)
virtual

Write method.

Parameters
outStream to write to.

Implements ossimNitfRegisteredTag.

Definition at line 53 of file ossimNitfBlockaTag.cpp.

References BLOCK_INSTANCE_SIZE, FIELD_11_SIZE, FIELD_6_SIZE, FRFC_LOC_SIZE, FRLC_LOC_SIZE, L_LINES_SIZE, LAYOVER_ANGLE_SIZE, LRFC_LOC_SIZE, LRLC_LOC_SIZE, N_GRAY_SIZE, SHADOW_ANGLE_SIZE, theBlockInstance, theField11, theField6, theFrfcLoc, theFrlcLoc, theLayoverAngle, theLLines, theLrfcLoc, theLrlcLoc, theNGray, and theShadowAngle.

54 {
56  out.write(theNGray, N_GRAY_SIZE);
57  out.write(theLLines, L_LINES_SIZE);
60  out.write(theField6, FIELD_6_SIZE);
61  out.write(theFrlcLoc, FRLC_LOC_SIZE);
62  out.write(theLrlcLoc, LRLC_LOC_SIZE);
63  out.write(theLrfcLoc, LRFC_LOC_SIZE);
64  out.write(theFrfcLoc, FRFC_LOC_SIZE);
65  out.write(theField11, FIELD_11_SIZE);
66 }
char theFrlcLoc[FRLC_LOC_SIZE+1]
FIELD: FRLC_LOC.
char theFrfcLoc[FRFC_LOC_SIZE+1]
FIELD: FRFC_LOC.
char theNGray[N_GRAY_SIZE+1]
FIELD: N_GRAY.
char theField6[FIELD_6_SIZE+1]
FIELD: FIELD_6.
char theLrlcLoc[LRLC_LOC_SIZE+1]
FIELD: LRLC_LOC.
char theShadowAngle[SHADOW_ANGLE_SIZE+1]
FIELD: SHADOW_ANGLE.
char theLLines[L_LINES_SIZE+1]
FIELD: L_LINES.
char theLayoverAngle[LAYOVER_ANGLE_SIZE+1]
FIELD: LAYOVER_ANGLE.
char theLrfcLoc[LRFC_LOC_SIZE+1]
FIELD: LRFC_LOC.
char theBlockInstance[BLOCK_INSTANCE_SIZE+1]
FIELD: BLOCK_INSTANCE.
char theField11[FIELD_11_SIZE+1]
FIELD: FIELD_11.

Member Data Documentation

◆ theBlockInstance

char ossimNitfBlockaTag::theBlockInstance[BLOCK_INSTANCE_SIZE+1]
protected

FIELD: BLOCK_INSTANCE.

required 2 byte field

01 to 99

Block number of the image.

Definition at line 205 of file ossimNitfBlockaTag.h.

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

◆ theField11

char ossimNitfBlockaTag::theField11[FIELD_11_SIZE+1]
protected

FIELD: FIELD_11.

Reserved field of 5 bytes containing: 010.0

Definition at line 331 of file ossimNitfBlockaTag.h.

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

◆ theField6

char ossimNitfBlockaTag::theField6[FIELD_6_SIZE+1]
protected

FIELD: FIELD_6.

Reserved field of 16 spaces.

Definition at line 264 of file ossimNitfBlockaTag.h.

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

◆ theFrfcLoc

char ossimNitfBlockaTag::theFrfcLoc[FRFC_LOC_SIZE+1]
protected

FIELD: FRFC_LOC.

required 21 byte field

XDDMMSS.SSYDDDMMSS.SS OR +-dd.dddddd+-ddd.dddddd OR 21 spaces

Location of the first row, first column of the image block.

Definition at line 324 of file ossimNitfBlockaTag.h.

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

◆ theFrlcLoc

char ossimNitfBlockaTag::theFrlcLoc[FRLC_LOC_SIZE+1]
protected

FIELD: FRLC_LOC.

required 21 byte field

XDDMMSS.SSYDDDMMSS.SS OR +-dd.dddddd+-ddd.dddddd OR 21 spaces

Location of the first row, last column of the image block.

Definition at line 279 of file ossimNitfBlockaTag.h.

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

◆ theLayoverAngle

char ossimNitfBlockaTag::theLayoverAngle[LAYOVER_ANGLE_SIZE+1]
protected

FIELD: LAYOVER_ANGLE.

required 3 byte field

000 to 359 or spaces

SAR: Angle between the first row of pixels and the layover direction in the image, measured in a clockwise direction.

EO-IR: spaces

Definition at line 243 of file ossimNitfBlockaTag.h.

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

◆ theLLines

char ossimNitfBlockaTag::theLLines[L_LINES_SIZE+1]
protected

FIELD: L_LINES.

required 5 byte field

00000 to 99999

Row count.

Definition at line 229 of file ossimNitfBlockaTag.h.

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

◆ theLrfcLoc

char ossimNitfBlockaTag::theLrfcLoc[LRFC_LOC_SIZE+1]
protected

FIELD: LRFC_LOC.

required 21 byte field

XDDMMSS.SSYDDDMMSS.SS OR +-dd.dddddd+-ddd.dddddd OR 21 spaces

Location of the last row, first column of the image block.

Definition at line 309 of file ossimNitfBlockaTag.h.

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

◆ theLrlcLoc

char ossimNitfBlockaTag::theLrlcLoc[LRLC_LOC_SIZE+1]
protected

FIELD: LRLC_LOC.

required 21 byte field

XDDMMSS.SSYDDDMMSS.SS OR +-dd.dddddd+-ddd.dddddd OR 21 spaces

Location of the last row, last column of the image block.

Definition at line 294 of file ossimNitfBlockaTag.h.

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

◆ theNGray

char ossimNitfBlockaTag::theNGray[N_GRAY_SIZE+1]
protected

FIELD: N_GRAY.

required 5 byte field

00000 to 99999

SAR The number of gray fill pixels.

EO-IR: 00000

Definition at line 218 of file ossimNitfBlockaTag.h.

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

◆ theShadowAngle

char ossimNitfBlockaTag::theShadowAngle[SHADOW_ANGLE_SIZE+1]
protected

FIELD: SHADOW_ANGLE.

required 3 byte field

000 to 359 or spaces

SAR: Angle between the first row of pixels and the radar shadow in the image, measured in a clockwase direction.

EO-IR: spaces

Definition at line 257 of file ossimNitfBlockaTag.h.

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


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