#include <ossimDtedRecord.h>
Definition at line 31 of file ossimDtedRecord.h.
◆ anonymous enum
Enumerator |
---|
DATA_LENGTH | |
DATA_BLOCK_COUNT | |
DATA_LON_COUNT | |
DATA_LAT_COUNT | |
DATA_ELEV_START | |
DATA_BYTES_PER_POINT | |
Definition at line 55 of file ossimDtedRecord.h.
◆ ossimDtedRecord() [1/2]
Definition at line 50 of file ossimDtedRecord.cpp.
64 theStopOffset(offset + RECORD_HDR_LENGTH + (num_points*BYTES_PER_POINT))
69 in.read((
char*)buf, 1);
72 printf(
"\nBuf: %02X", (
int)buf[0]);
75 if(buf[0] != DATA_RECOGNITION_SENTINEL)
101 <<
"FATAL ossimDtedRecord::ossimDtedRecord:" 102 <<
"\nInvalid checksum in data record at: " 106 <<
"\nDTED Elevation File is considered corrupted." void parse(std::istream &in)
ossim_int32 theStartOffset
static const ossimErrorCode OSSIM_ERROR
unsigned short ossim_uint16
ossim_int32 theStopOffset
bool validateCheckSum(std::istream &in)
ossim_int32 theDataBlockCount
ossimErrorCode theErrorStatus
ossim_uint32 theComputedCheckSum
ossim_uint16 * thePointsData
unsigned char ossim_uint8
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
◆ ~ossimDtedRecord()
ossimDtedRecord::~ossimDtedRecord |
( |
| ) |
|
◆ ossimDtedRecord() [2/2]
◆ checkSum()
◆ computedCheckSum()
◆ dataBlockCount()
◆ getPoint()
◆ getPointData()
◆ latCount()
◆ lonCount()
◆ numPoints()
◆ parse()
void ossimDtedRecord::parse |
( |
std::istream & |
in | ) |
|
Definition at line 129 of file ossimDtedRecord.cpp.
References ossim::byteOrder(), OSSIM_LITTLE_ENDIAN, theStartOffset, and true.
138 in.read((
char*)&s, 2);
140 (swap_bytes ? ( ( (s & 0x00ff) << 8) | ( (s & 0xff00) >> 8) ) : s);
144 in.read((
char*)&s, 2);
146 (swap_bytes ? ( ( (s & 0x00ff) << 8) | ( (s & 0xff00) >> 8) ) : s);
150 in.read((
char*)&s, 2);
152 (swap_bytes ? ( ( (s & 0x00ff) << 8) | ( (s & 0xff00) >> 8) ) : s);
158 in.read((
char*)&s, 2);
159 s = (swap_bytes ? ( ( (s & 0x00ff) << 8) | ( (s & 0xff00) >> 8) ) : s);
160 if (s & DATA_SIGN_MASK)
162 s = (s & DATA_VALUE_MASK) * -1;
ossim_int32 theStartOffset
OSSIM_DLL ossimByteOrder byteOrder()
signed short ossim_sint16
ossim_int32 theDataBlockCount
ossim_uint16 * thePointsData
◆ points()
◆ pointsData()
◆ recognitionSentinel()
ossimString ossimDtedRecord::recognitionSentinel |
( |
| ) |
const |
◆ startOffset()
◆ stopOffset()
◆ validateCheckSum()
bool ossimDtedRecord::validateCheckSum |
( |
std::istream & |
in | ) |
|
|
private |
Compute the check sum for the Data Record and compare against the parsed check sum from the data record. This must be correct to be a valid data record. If not, there is a chance of a corrupted elevation cell.
- Returns
- true if check sum validates, false if not.
Definition at line 172 of file ossimDtedRecord.cpp.
References ossim::byteOrder(), OSSIM_LITTLE_ENDIAN, theComputedCheckSum, theNumPoints, theStartOffset, and true.
183 for(i = 0; i < bytesToRead; i++)
186 in.read((
char*)&c, 1);
ossim_int32 theStartOffset
OSSIM_DLL ossimByteOrder byteOrder()
unsigned int ossim_uint32
ossim_uint32 theComputedCheckSum
unsigned char ossim_uint8
◆ operator<<
Definition at line 274 of file ossimDtedRecord.cpp.
276 os <<
"\nDTED Record:" 277 <<
"\n-------------------------------" 278 <<
"\n Recognition Sentinel: " << rec.
theRecSen 292 os <<
"\nPoint[" << i <<
"]: " << rec.
thePoints[i];
ossim_int32 theStartOffset
ossim_int32 theStopOffset
ossim_int32 theDataBlockCount
ossim_uint32 theComputedCheckSum
◆ theCheckSum
Algebraic addition of contents of block. The checksum is computed algebraically using integer arithmetic by summing all header and elevation bytes contained int the record as 8-bit values. Each byte is considered an unsigned, 8-bit value for checksum calculation.
Definition at line 125 of file ossimDtedRecord.h.
Referenced by checkSum(), and operator<<().
◆ theComputedCheckSum
◆ theDataBlockCount
◆ theFile
◆ theLatCount
◆ theLonCount
Count of the meridian. True longitude = longitude count x data interval + origin (Offset from the SW corner longitude)
Definition at line 109 of file ossimDtedRecord.h.
Referenced by lonCount(), and operator<<().
◆ theNumPoints
◆ thePoints
◆ thePointsData
◆ theRecSen
◆ theStartOffset
◆ theStopOffset
The documentation for this class was generated from the following files: