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

#include <ossimRpfCoverageSection.h>

Public Member Functions

 ossimRpfCoverageSection ()
 
 ossimRpfCoverageSection (const ossimRpfCoverageSection &obj)
 
const ossimRpfCoverageSectionoperator= (const ossimRpfCoverageSection &rhs)
 
 ~ossimRpfCoverageSection ()
 
ossimErrorCode parseStream (std::istream &in, ossimByteOrder byteOrder)
 
void writeStream (std::ostream &out)
 Write method. More...
 
std::ostream & print (std::ostream &out, const std::string &prefix=std::string()) const
 print method that outputs a key/value type format adding prefix to keys. More...
 
void clearFields ()
 
bool isGeographicRectNull () const
 
bool isIntervalNull () const
 
ossim_float64 getUlLat () const
 
ossim_float64 getUlLon () const
 
ossim_float64 getLlLat () const
 
ossim_float64 getLlLon () const
 
ossim_float64 getLrLat () const
 
ossim_float64 getLrLon () const
 
ossim_float64 getUrLat () const
 
ossim_float64 getUrLon () const
 
ossim_float64 getVerticalResolution () const
 
ossim_float64 getHorizontalResolution () const
 
ossim_float64 getVerticalInterval () const
 
ossim_float64 getHorizontalInterval () const
 
void setUlLat (ossim_float64 value)
 Sets theUpperLeftLat to value. More...
 
void setUlLon (ossim_float64 value)
 Sets theUpperLeftLon to value. More...
 
void setLlLat (ossim_float64 value)
 Sets theLowerLeftLat to value. More...
 
void setLlLon (ossim_float64 value)
 Sets theLowerLeftLon to value. More...
 
void setLrLat (ossim_float64 value)
 Sets theLowerRightLat to value. More...
 
void setLrLon (ossim_float64 value)
 Sets theLowerRightLon to value. More...
 
void setUrLat (ossim_float64 value)
 Sets theUpperRightLat to value. More...
 
void setUrLon (ossim_float64 value)
 Sets theUpperRightLon to value. More...
 
void setVerticalResolution (ossim_float64 value)
 Sets theVerticalResolution to value. More...
 
void setHorizontalResolution (ossim_float64 value)
 Sets theHorizontalResolution to value. More...
 
void setVerticalInterval (ossim_float64 value)
 Sets theVerticalInterval to value. More...
 
void setHorizontalInterval (ossim_float64 value)
 Sets theHorizontalInterval to value. More...
 

Private Attributes

ossim_float64 theUpperLeftLat
 
ossim_float64 theUpperLeftLon
 
ossim_float64 theLowerLeftLat
 
ossim_float64 theLowerLeftLon
 
ossim_float64 theUpperRightLat
 
ossim_float64 theUpperRightLon
 
ossim_float64 theLowerRightLat
 
ossim_float64 theLowerRightLon
 
ossim_float64 theVerticalResolution
 
ossim_float64 theHorizontalResolution
 
ossim_float64 theVerticalInterval
 
ossim_float64 theHorizontalInterval
 

Friends

std::ostream & operator<< (std::ostream &out, const ossimRpfCoverageSection &data)
 

Detailed Description

Definition at line 22 of file ossimRpfCoverageSection.h.

Constructor & Destructor Documentation

◆ ossimRpfCoverageSection() [1/2]

ossimRpfCoverageSection::ossimRpfCoverageSection ( )

Definition at line 26 of file ossimRpfCoverageSection.cpp.

27  :
28  theUpperLeftLat(0.0),
29  theUpperLeftLon(0.0),
30 
31  theLowerLeftLat(0.0),
32  theLowerLeftLon(0.0),
33 
34  theUpperRightLat(0.0),
35  theUpperRightLon(0.0),
36 
37  theLowerRightLat(0.0),
38  theLowerRightLon(0.0),
39 
42 
45 {
46 }

◆ ossimRpfCoverageSection() [2/2]

ossimRpfCoverageSection::ossimRpfCoverageSection ( const ossimRpfCoverageSection obj)

Definition at line 48 of file ossimRpfCoverageSection.cpp.

49  :
52 
55 
58 
61 
64 
67 {
68 }

◆ ~ossimRpfCoverageSection()

ossimRpfCoverageSection::~ossimRpfCoverageSection ( )
inline

Definition at line 32 of file ossimRpfCoverageSection.h.

32 {}

Member Function Documentation

◆ clearFields()

void ossimRpfCoverageSection::clearFields ( )

Definition at line 221 of file ossimRpfCoverageSection.cpp.

References theHorizontalInterval, theHorizontalResolution, theLowerLeftLat, theLowerLeftLon, theLowerRightLat, theLowerRightLon, theUpperLeftLat, theUpperLeftLon, theUpperRightLat, theUpperRightLon, theVerticalInterval, and theVerticalResolution.

Referenced by ossimRpfBoundaryRectRecord::clearFields().

222 {
223  theUpperLeftLat = 0.0;
224  theUpperLeftLon = 0.0;
225  theLowerLeftLat = 0.0;
226  theLowerLeftLon = 0.0;
227  theUpperRightLat = 0.0;
228  theUpperRightLon = 0.0;
229  theLowerRightLat = 0.0;
230  theLowerRightLon = 0.0;
231  theVerticalResolution = 0.0;
233  theVerticalInterval = 0.0;
234  theHorizontalInterval = 0.0;
235 }

◆ getHorizontalInterval()

ossim_float64 ossimRpfCoverageSection::getHorizontalInterval ( ) const
inline

This indicates the lon increment per pixel in degrees.

Definition at line 95 of file ossimRpfCoverageSection.h.

References theHorizontalInterval.

Referenced by ossimRpfTocEntry::getDecimalDegreesPerPixel().

◆ getHorizontalResolution()

ossim_float64 ossimRpfCoverageSection::getHorizontalResolution ( ) const
inline

◆ getLlLat()

ossim_float64 ossimRpfCoverageSection::getLlLat ( ) const
inline

Definition at line 77 of file ossimRpfCoverageSection.h.

References theLowerLeftLat.

Referenced by ossimRpfTocEntry::getImageGeometry().

77 {return theLowerLeftLat;}

◆ getLlLon()

ossim_float64 ossimRpfCoverageSection::getLlLon ( ) const
inline

Definition at line 78 of file ossimRpfCoverageSection.h.

References theLowerLeftLon.

78 {return theLowerLeftLon;}

◆ getLrLat()

ossim_float64 ossimRpfCoverageSection::getLrLat ( ) const
inline

Definition at line 79 of file ossimRpfCoverageSection.h.

References theLowerRightLat.

Referenced by ossimRpfTocEntry::getDecimalDegreesPerPixel().

79 {return theLowerRightLat;}

◆ getLrLon()

ossim_float64 ossimRpfCoverageSection::getLrLon ( ) const
inline

Definition at line 80 of file ossimRpfCoverageSection.h.

References theLowerRightLon.

80 {return theLowerRightLon;}

◆ getUlLat()

ossim_float64 ossimRpfCoverageSection::getUlLat ( ) const
inline

◆ getUlLon()

ossim_float64 ossimRpfCoverageSection::getUlLon ( ) const
inline

◆ getUrLat()

ossim_float64 ossimRpfCoverageSection::getUrLat ( ) const
inline

Definition at line 81 of file ossimRpfCoverageSection.h.

References theUpperRightLat.

81 {return theUpperRightLat;}

◆ getUrLon()

ossim_float64 ossimRpfCoverageSection::getUrLon ( ) const
inline

Definition at line 82 of file ossimRpfCoverageSection.h.

References theUpperRightLon.

Referenced by ossimRpfTocEntry::getDecimalDegreesPerPixel().

82 {return theUpperRightLon;}

◆ getVerticalInterval()

ossim_float64 ossimRpfCoverageSection::getVerticalInterval ( ) const
inline

This indicates the lat increment per pixel in degrees.

Definition at line 90 of file ossimRpfCoverageSection.h.

References theVerticalInterval.

Referenced by ossimRpfTocEntry::getDecimalDegreesPerPixel().

◆ getVerticalResolution()

ossim_float64 ossimRpfCoverageSection::getVerticalResolution ( ) const
inline

Definition at line 84 of file ossimRpfCoverageSection.h.

References theVerticalResolution.

Referenced by ossimRpfTocEntry::getMetersPerPixel().

◆ isGeographicRectNull()

bool ossimRpfCoverageSection::isGeographicRectNull ( ) const
inline

Definition at line 58 of file ossimRpfCoverageSection.h.

References OSSIM_RPF_ULONG_NULL, theLowerLeftLat, theLowerLeftLon, theLowerRightLat, theLowerRightLon, theUpperLeftLat, theUpperLeftLon, theUpperRightLat, and theUpperRightLon.

Referenced by ossimCibCadrgTileSource::setEntryToRender().

◆ isIntervalNull()

bool ossimRpfCoverageSection::isIntervalNull ( ) const
inline

Definition at line 69 of file ossimRpfCoverageSection.h.

References OSSIM_RPF_ULONG_NULL, theHorizontalInterval, and theVerticalInterval.

70  {
73  }
const unsigned long OSSIM_RPF_ULONG_NULL

◆ operator=()

const ossimRpfCoverageSection & ossimRpfCoverageSection::operator= ( const ossimRpfCoverageSection rhs)

Definition at line 70 of file ossimRpfCoverageSection.cpp.

References theHorizontalInterval, theHorizontalResolution, theLowerLeftLat, theLowerLeftLon, theLowerRightLat, theLowerRightLon, theUpperLeftLat, theUpperLeftLon, theUpperRightLat, theUpperRightLon, theVerticalInterval, and theVerticalResolution.

72 {
73  if ( this != & rhs )
74  {
77 
80 
83 
86 
89 
92  }
93  return *this;
94 }

◆ parseStream()

ossimErrorCode ossimRpfCoverageSection::parseStream ( std::istream &  in,
ossimByteOrder  byteOrder 
)

Definition at line 96 of file ossimRpfCoverageSection.cpp.

References ossim::byteOrder(), ossimErrorCodes::OSSIM_ERROR, ossimErrorCodes::OSSIM_OK, ossimEndian::swap(), theHorizontalInterval, theHorizontalResolution, theLowerLeftLat, theLowerLeftLon, theLowerRightLat, theLowerRightLon, theUpperLeftLat, theUpperLeftLon, theUpperRightLat, theUpperRightLon, theVerticalInterval, and theVerticalResolution.

Referenced by ossimRpfHeader::getNewCoverageSection(), and ossimRpfBoundaryRectRecord::parseStream().

98 {
99  if(in)
100  {
101  in.read((char*)&theUpperLeftLat, 8);
102  in.read((char*)&theUpperLeftLon, 8);
103  in.read((char*)&theLowerLeftLat, 8);
104  in.read((char*)&theLowerLeftLon, 8);
105  in.read((char*)&theUpperRightLat, 8);
106  in.read((char*)&theUpperRightLon, 8);
107  in.read((char*)&theLowerRightLat, 8);
108  in.read((char*)&theLowerRightLon, 8);
109  in.read((char*)&theVerticalResolution, 8);
110  in.read((char*)&theHorizontalResolution, 8);
111  in.read((char*)&theVerticalInterval, 8);
112  in.read((char*)&theHorizontalInterval, 8);
113 
114  if( ossim::byteOrder() != byteOrder )
115  {
116  ossimEndian anEndian;
117  anEndian.swap(theUpperLeftLat);
118  anEndian.swap(theUpperLeftLon);
119  anEndian.swap(theLowerLeftLat);
120  anEndian.swap(theLowerLeftLon);
121  anEndian.swap(theUpperRightLat);
122  anEndian.swap(theUpperRightLon);
123  anEndian.swap(theLowerRightLat);
124  anEndian.swap(theLowerRightLon);
125  anEndian.swap(theVerticalResolution);
126  anEndian.swap(theHorizontalResolution);
127  anEndian.swap(theVerticalInterval);
128  anEndian.swap(theHorizontalInterval);
129  }
130  }
131  else
132  {
134  }
135 
137 }
static const ossimErrorCode OSSIM_OK
OSSIM_DLL ossimByteOrder byteOrder()
Definition: ossimCommon.cpp:54
static const ossimErrorCode OSSIM_ERROR
void swap(ossim_sint8 &)
Definition: ossimEndian.h:26

◆ print()

std::ostream & ossimRpfCoverageSection::print ( std::ostream &  out,
const std::string &  prefix = std::string() 
) const

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

Parameters
outString to output to.
prefixThis will be prepended to key. e.g. Where prefix = "nitf." and key is "file_name" key becomes: "nitf.file_name:"
Returns
output stream.

Definition at line 191 of file ossimRpfCoverageSection.cpp.

References theHorizontalInterval, theHorizontalResolution, theLowerLeftLat, theLowerLeftLon, theLowerRightLat, theLowerRightLon, theUpperLeftLat, theUpperLeftLon, theUpperRightLat, theUpperRightLon, theVerticalInterval, and theVerticalResolution.

Referenced by operator<<(), and ossimRpfBoundaryRectRecord::print().

193 {
194  out << prefix << "ul_lat: "
195  << theUpperLeftLat << "\n"
196  << prefix << "ul_lon: "
197  << theUpperLeftLon << "\n"
198  << prefix << "ll_lat: "
199  << theLowerLeftLat << "\n"
200  << prefix << "ll_lon: "
201  << theLowerLeftLon << "\n"
202  << prefix << "ur_lat: "
203  << theUpperRightLat << "\n"
204  << prefix << "ur_lon: "
205  << theUpperRightLon << "\n"
206  << prefix << "lr_lat: "
207  << theLowerRightLat << "\n"
208  << prefix << "lr_lon: "
209  << theLowerRightLon << "\n"
210  << prefix << "vertical_resolution: "
211  << theVerticalResolution << "\n"
212  << prefix << "horizontal_resolution: "
213  << theHorizontalResolution << "\n"
214  << prefix << "vertical_interval: "
215  << theVerticalInterval << "\n"
216  << prefix << "horizontal_interval: "
217  << theHorizontalInterval << std::endl;
218  return out;
219 }

◆ setHorizontalInterval()

void ossimRpfCoverageSection::setHorizontalInterval ( ossim_float64  value)

Sets theHorizontalInterval to value.

Definition at line 292 of file ossimRpfCoverageSection.cpp.

References theHorizontalInterval.

293 {
294  theHorizontalInterval = value;
295 }

◆ setHorizontalResolution()

void ossimRpfCoverageSection::setHorizontalResolution ( ossim_float64  value)

Sets theHorizontalResolution to value.

Definition at line 282 of file ossimRpfCoverageSection.cpp.

References theHorizontalResolution.

283 {
284  theHorizontalResolution = value;
285 }

◆ setLlLat()

void ossimRpfCoverageSection::setLlLat ( ossim_float64  value)

Sets theLowerLeftLat to value.

Definition at line 247 of file ossimRpfCoverageSection.cpp.

References theLowerLeftLat.

248 {
249  theLowerLeftLat = value;
250 }

◆ setLlLon()

void ossimRpfCoverageSection::setLlLon ( ossim_float64  value)

Sets theLowerLeftLon to value.

Definition at line 252 of file ossimRpfCoverageSection.cpp.

References theLowerLeftLon.

253 {
254  theLowerLeftLon = value;
255 }

◆ setLrLat()

void ossimRpfCoverageSection::setLrLat ( ossim_float64  value)

Sets theLowerRightLat to value.

Definition at line 257 of file ossimRpfCoverageSection.cpp.

References theLowerRightLat.

258 {
259  theLowerRightLat = value;
260 }

◆ setLrLon()

void ossimRpfCoverageSection::setLrLon ( ossim_float64  value)

Sets theLowerRightLon to value.

Definition at line 262 of file ossimRpfCoverageSection.cpp.

References theLowerRightLon.

263 {
264  theLowerRightLon = value;
265 }

◆ setUlLat()

void ossimRpfCoverageSection::setUlLat ( ossim_float64  value)

Sets theUpperLeftLat to value.

Definition at line 237 of file ossimRpfCoverageSection.cpp.

References theUpperLeftLat.

238 {
239  theUpperLeftLat = value;
240 }

◆ setUlLon()

void ossimRpfCoverageSection::setUlLon ( ossim_float64  value)

Sets theUpperLeftLon to value.

Definition at line 242 of file ossimRpfCoverageSection.cpp.

References theUpperLeftLon.

243 {
244  theUpperLeftLon = value;
245 }

◆ setUrLat()

void ossimRpfCoverageSection::setUrLat ( ossim_float64  value)

Sets theUpperRightLat to value.

Definition at line 267 of file ossimRpfCoverageSection.cpp.

References theUpperRightLat.

268 {
269  theUpperRightLat = value;
270 }

◆ setUrLon()

void ossimRpfCoverageSection::setUrLon ( ossim_float64  value)

Sets theUpperRightLon to value.

Definition at line 272 of file ossimRpfCoverageSection.cpp.

References theUpperRightLon.

273 {
274  theUpperRightLon = value;
275 }

◆ setVerticalInterval()

void ossimRpfCoverageSection::setVerticalInterval ( ossim_float64  value)

Sets theVerticalInterval to value.

Definition at line 287 of file ossimRpfCoverageSection.cpp.

References theVerticalInterval.

288 {
289  theVerticalInterval = value;
290 }

◆ setVerticalResolution()

void ossimRpfCoverageSection::setVerticalResolution ( ossim_float64  value)

Sets theVerticalResolution to value.

Definition at line 277 of file ossimRpfCoverageSection.cpp.

References theVerticalResolution.

278 {
279  theVerticalResolution = value;
280 }

◆ writeStream()

void ossimRpfCoverageSection::writeStream ( std::ostream &  out)

Write method.

Parameters
outStream to write to.

Definition at line 139 of file ossimRpfCoverageSection.cpp.

References ossimEndian::getSystemEndianType(), OSSIM_BIG_ENDIAN, ossimEndian::swap(), theHorizontalInterval, theHorizontalResolution, theLowerLeftLat, theLowerLeftLon, theLowerRightLat, theLowerRightLon, theUpperLeftLat, theUpperLeftLon, theUpperRightLat, theUpperRightLon, theVerticalInterval, and theVerticalResolution.

Referenced by ossimRpfBoundaryRectRecord::writeStream().

140 {
141  ossimEndian anEndian;
142 
143  if( anEndian.getSystemEndianType() != OSSIM_BIG_ENDIAN )
144  {
145  // Always write out big endian.
146  anEndian.swap(theUpperLeftLat);
147  anEndian.swap(theUpperLeftLon);
148  anEndian.swap(theLowerLeftLat);
149  anEndian.swap(theLowerLeftLon);
150  anEndian.swap(theUpperRightLat);
151  anEndian.swap(theUpperRightLon);
152  anEndian.swap(theLowerRightLat);
153  anEndian.swap(theLowerRightLon);
154  anEndian.swap(theVerticalResolution);
155  anEndian.swap(theHorizontalResolution);
156  anEndian.swap(theVerticalInterval);
157  anEndian.swap(theHorizontalInterval);
158  }
159 
160  out.write((char*)&theUpperLeftLat, 8);
161  out.write((char*)&theUpperLeftLon, 8);
162  out.write((char*)&theLowerLeftLat, 8);
163  out.write((char*)&theLowerLeftLon, 8);
164  out.write((char*)&theUpperRightLat, 8);
165  out.write((char*)&theUpperRightLon, 8);
166  out.write((char*)&theLowerRightLat, 8);
167  out.write((char*)&theLowerRightLon, 8);
168  out.write((char*)&theVerticalResolution, 8);
169  out.write((char*)&theHorizontalResolution, 8);
170  out.write((char*)&theVerticalInterval, 8);
171  out.write((char*)&theHorizontalInterval, 8);
172 
173  if( anEndian.getSystemEndianType() != OSSIM_BIG_ENDIAN )
174  {
175  // Swap back to native byte order.
176  anEndian.swap(theUpperLeftLat);
177  anEndian.swap(theUpperLeftLon);
178  anEndian.swap(theLowerLeftLat);
179  anEndian.swap(theLowerLeftLon);
180  anEndian.swap(theUpperRightLat);
181  anEndian.swap(theUpperRightLon);
182  anEndian.swap(theLowerRightLat);
183  anEndian.swap(theLowerRightLon);
184  anEndian.swap(theVerticalResolution);
185  anEndian.swap(theHorizontalResolution);
186  anEndian.swap(theVerticalInterval);
187  anEndian.swap(theHorizontalInterval);
188  }
189 }
ossimByteOrder getSystemEndianType() const
Definition: ossimEndian.h:78
void swap(ossim_sint8 &)
Definition: ossimEndian.h:26

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const ossimRpfCoverageSection data 
)
friend

Definition at line 21 of file ossimRpfCoverageSection.cpp.

22 {
23  return data.print(out);
24 }
std::ostream & print(std::ostream &out, const std::string &prefix=std::string()) const
print method that outputs a key/value type format adding prefix to keys.

Member Data Documentation

◆ theHorizontalInterval

ossim_float64 ossimRpfCoverageSection::theHorizontalInterval
private

◆ theHorizontalResolution

ossim_float64 ossimRpfCoverageSection::theHorizontalResolution
private

◆ theLowerLeftLat

ossim_float64 ossimRpfCoverageSection::theLowerLeftLat
private

◆ theLowerLeftLon

ossim_float64 ossimRpfCoverageSection::theLowerLeftLon
private

◆ theLowerRightLat

ossim_float64 ossimRpfCoverageSection::theLowerRightLat
private

◆ theLowerRightLon

ossim_float64 ossimRpfCoverageSection::theLowerRightLon
private

◆ theUpperLeftLat

ossim_float64 ossimRpfCoverageSection::theUpperLeftLat
private

8 byte ossim_float64 and is the upper left lat or North West portion of the image.

Definition at line 138 of file ossimRpfCoverageSection.h.

Referenced by clearFields(), getUlLat(), isGeographicRectNull(), operator=(), parseStream(), print(), setUlLat(), and writeStream().

◆ theUpperLeftLon

ossim_float64 ossimRpfCoverageSection::theUpperLeftLon
private

8 byte ossim_float64 and is the upper left lon (North west)

Definition at line 144 of file ossimRpfCoverageSection.h.

Referenced by clearFields(), getUlLon(), isGeographicRectNull(), operator=(), parseStream(), print(), setUlLon(), and writeStream().

◆ theUpperRightLat

ossim_float64 ossimRpfCoverageSection::theUpperRightLat
private

◆ theUpperRightLon

ossim_float64 ossimRpfCoverageSection::theUpperRightLon
private

◆ theVerticalInterval

ossim_float64 ossimRpfCoverageSection::theVerticalInterval
private

◆ theVerticalResolution

ossim_float64 ossimRpfCoverageSection::theVerticalResolution
private

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