OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
#include <ossimDemGrid.h>
Public Member Functions | |
ossimDemGrid (ossim_float32 missingDataValue=-32768.0) | |
~ossimDemGrid () | |
long | read (ossim::istream &dem, bool incrementalRead=false) |
ossimDemHeader const & | getHeader () const |
long | getWidth () const |
long | getHeight () const |
ossim_float32 | getElevation (long x, long y) const |
ossim_float32 | getMissingDataValue () const |
void | getGroundCoords (long x, long y, double &ground_x, double &ground_y) |
Private Member Functions | |
void | setElevation (long x, long y, ossim_float32 val) |
long | fillGeographic (ossim::istream &dem, bool incrementalRead) |
long | fillUTM (ossim::istream &dem, bool incrementalRead) |
Private Attributes | |
ossim_float32 | _missDataVal |
ossimDemHeader | _header |
long | _width |
long | _height |
ossim_float32 * | _grid |
bool | _firstTime |
long | _curProfile |
std::vector< ossimDemProfile > | _profiles |
double | _northwest_x |
double | _northwest_y |
class ossimDemGrid This class uses the DEM library to read a DEM and construct a rectangular grid of signed 16 bit point values.
Definition at line 27 of file ossimDemGrid.h.
ossimDemGrid::ossimDemGrid | ( | ossim_float32 | missingDataValue = -32768.0 | ) |
Missing or void data is replaced with missingDataValue.
Definition at line 20 of file ossimDemGrid.cpp.
ossimDemGrid::~ossimDemGrid | ( | ) |
|
private |
Definition at line 94 of file ossimDemGrid.cpp.
References _curProfile, _firstTime, _grid, _header, _height, _northwest_x, _northwest_y, _profiles, _width, ossimDemHeader::getProfileColumns(), ossimDemHeader::getSpatialResY(), ossimDemPoint::getX(), ossimDemPoint::getY(), and setElevation().
Referenced by read().
|
private |
Definition at line 141 of file ossimDemGrid.cpp.
References _curProfile, _firstTime, _grid, _header, _height, _missDataVal, _northwest_x, _northwest_y, _profiles, _width, ossimDemHeader::getProfileColumns(), ossimDemHeader::getSpatialResY(), ossimDemPoint::getX(), ossimDemPoint::getY(), ossimNotify(), ossimNotifyLevel_FATAL, setElevation(), x, and y.
Referenced by read().
ossim_float32 ossimDemGrid::getElevation | ( | long | x, |
long | y | ||
) | const |
Returns the elevation value at (x,y). (0,0) is in the upper left corner, x is positive to the right, y is positive down.
Definition at line 78 of file ossimDemGrid.cpp.
References _grid, _height, _missDataVal, _width, x, and y.
Referenced by ossimUsgsDemTileSource::fillBuffer().
void ossimDemGrid::getGroundCoords | ( | long | x, |
long | y, | ||
double & | ground_x, | ||
double & | ground_y | ||
) |
(x,y) are the coordinates of a elevation value in the dem. (ground_x, ground_y) are the coordinates of that value in the units of the horizontal projection system used by the dem.
Definition at line 244 of file ossimDemGrid.cpp.
References _header, _northwest_x, _northwest_y, ossimDemHeader::getSpatialResX(), ossimDemHeader::getSpatialResY(), x, and y.
ossimDemHeader const & ossimDemGrid::getHeader | ( | ) | const |
Definition at line 61 of file ossimDemGrid.cpp.
References _header.
Referenced by ossimUsgsDemTileSource::fillBuffer(), and ossimUsgsDemTileSource::getInternalImageGeometry().
long ossimDemGrid::getHeight | ( | ) | const |
Returns the number of rows in the grid.
Definition at line 73 of file ossimDemGrid.cpp.
References _height.
Referenced by ossimUsgsDemTileSource::getNumberOfLines().
ossim_float32 ossimDemGrid::getMissingDataValue | ( | ) | const |
Returns the value used to indicate missing data.
Definition at line 89 of file ossimDemGrid.cpp.
References _missDataVal.
long ossimDemGrid::getWidth | ( | ) | const |
Returns the number of columns in the grid.
Definition at line 67 of file ossimDemGrid.cpp.
References _width.
Referenced by ossimUsgsDemTileSource::getNumberOfSamples().
long ossimDemGrid::read | ( | ossim::istream & | dem, |
bool | incrementalRead = false |
||
) |
Convertes a DEM to a rectangular grid.
If incrementalRead is false, the entire DEM will be converted with just one call to read. 0 (zero) is returned if successful, -1 if error.
If incrementalRead is true, multiple calls to read are required, and the return value is as follows: >0 – Number of calls remaining until conversion is complete. ==0 – Conversion was successful. No more calls to read required. -1 – Error during conversion.
Definition at line 40 of file ossimDemGrid.cpp.
References _firstTime, _header, fillGeographic(), fillUTM(), and ossimDemHeader::getGroundRefSysCode().
|
inlineprivate |
Definition at line 101 of file ossimDemGrid.h.
References _grid, _width, x, and y.
Referenced by fillGeographic(), and fillUTM().
|
private |
Definition at line 92 of file ossimDemGrid.h.
Referenced by fillGeographic(), and fillUTM().
|
private |
Definition at line 91 of file ossimDemGrid.h.
Referenced by fillGeographic(), fillUTM(), and read().
|
private |
Definition at line 90 of file ossimDemGrid.h.
Referenced by fillGeographic(), fillUTM(), getElevation(), setElevation(), and ~ossimDemGrid().
|
private |
Definition at line 87 of file ossimDemGrid.h.
Referenced by fillGeographic(), fillUTM(), getGroundCoords(), getHeader(), and read().
|
private |
Definition at line 89 of file ossimDemGrid.h.
Referenced by fillGeographic(), fillUTM(), getElevation(), and getHeight().
|
private |
Definition at line 86 of file ossimDemGrid.h.
Referenced by fillUTM(), getElevation(), and getMissingDataValue().
|
private |
Definition at line 94 of file ossimDemGrid.h.
Referenced by fillGeographic(), fillUTM(), and getGroundCoords().
|
private |
Definition at line 94 of file ossimDemGrid.h.
Referenced by fillGeographic(), fillUTM(), and getGroundCoords().
|
private |
Definition at line 93 of file ossimDemGrid.h.
Referenced by fillGeographic(), and fillUTM().
|
private |
Definition at line 88 of file ossimDemGrid.h.
Referenced by fillGeographic(), fillUTM(), getElevation(), getWidth(), and setElevation().