33 static ossimTrace traceDebug (
"ossimImageElevationHandler:debug");
61 static const char M[] =
"ossimImageElevationHandler::open";
94 std::vector<ossimGpt> corner(4);
101 if ( corner[i].lon < ulGpt.
lon ) ulGpt.
lon = corner[i].lon;
102 if ( corner[i].lat > ulGpt.
lat ) ulGpt.
lat = corner[i].lat;
103 if ( corner[i].lon > lrGpt.
lon ) lrGpt.
lon = corner[i].lon;
104 if ( corner[i].lat < lrGpt.
lat ) lrGpt.
lat = corner[i].lat;
124 <<
"\nreturn status: " << (result?
"true\n":
"false\n");
155 if (x0 == static_cast<ossim_uint32>(data_lr.
x))
157 if (y0 == static_cast<ossim_uint32>(data_lr.
y))
165 double xt0 = dpt.
x - x0;
166 double yt0 = dpt.
y - y0;
170 double w00 = xt1*yt1;
171 double w01 = xt0*yt1;
172 double w10 = xt1*yt0;
173 double w11 = xt0*yt0;
188 cout <<
"\np00: " << p00
199 double sum_weights = w00 + w01 + w10 + w11;
201 height = (p00*w00 + p01*w01 + p10*w10 + p11*w11) / sum_weights;
216 std::lock_guard<std::mutex> lock(
m_mutex);
217 vector<TileCacheEntry>::iterator iter =
m_tileCache.begin();
218 while ((iter !=
m_tileCache.end()) && (iter->id != tile_id))
274 height = data->
getPix(0, 0);
virtual ~ossimImageElevationHandler()
Protected destructor.
ossimRefPtr< ossimImageGeometry > m_geom
bool pointWithin(const ossimDpt &pt, double epsilon=0.0) const
ossim_float64 width() const
ossimDrect m_rect
Image space rect stored as drect for inlined pointHasCoverage method.
virtual ossimImageHandler * open(const ossimFilename &fileName, bool trySuffixFirst=true, bool openOverview=true) const
open that takes a filename.
virtual bool isOpen() const
virtual ossim_uint32 getNumberOfLines(ossim_uint32 resLevel=0) const =0
Pure virtual, derived classes must implement.
double nan()
Method to return ieee floating point double precision NAN.
virtual ossimIpt getSizeOfElevCell() const
METHOD: getSizeOfElevCell Returns the number of post in the cell.
OSSIM_DLL void defaultTileSize(ossimIpt &tileSize)
bool getCornerGpts(ossimGpt &ul, ossimGpt &ur, ossimGpt &lr, ossimGpt &ll) const
Assigns the ossimGpts with the ground coordinates of the four corresponding image corner points...
virtual ossim_float64 getPix(const ossimIpt &position, ossim_uint32 band=0) const
Will return the pixel at location position.
virtual ossimObject * dup() const
virtual void assign(const ossimDataObject *data)
Elevation source for a generic image opened via ossimImageHandler.
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if non defined...
std::string::size_type size() const
const ossimImageElevationHandler & operator=(const ossimImageElevationHandler &rhs)
Hidden from use assignment operator.
unsigned int ossim_uint32
virtual const ossim_float64 * getNullPix() const
ossimDpt getMetersPerPixel() const
Returns the GSD associated with this image in the active projection.
virtual double getPostValue(const ossimIpt &gridPt) const
METHOD: getPostValue Returns the value at a given grid point as a double.
virtual ossimIrect getImageRectangle() const
ossimFilename theFilename
Virtual method for reading.
const ossimIpt & lr() const
virtual void close()
Closes the stream to the file.
ossim_uint32 m_numTilesPerRow
ossimImageElevationHandler()
default constructor
ossimRefPtr< ossimImageHandler > m_ih
Pointers to links in chain.
std::vector< TileCacheEntry > m_tileCache
virtual double getHeightAboveMSL(const ossimGpt &)
METHOD: getHeightAboveMSL Height access methods.
bool worldToLocal(const ossimGpt &world_pt, ossimDpt &local_pt) const
Exposes the 3D world-to-local image coordinate reverse projection.
virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel=0) const =0
Pure virtual, derived classes must implement.
static ossimImageHandlerRegistry * instance()
#define RTTI_DEF1(cls, name, b1)
virtual bool open(const ossimFilename &file)
Opens a stream to the srtm cell.
ossimImageData * getTile(ossim_uint32 x, ossim_uint32 y) const
Looks for an elevation tile in the cache first before reading the tile from the input handler...
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)