OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimGeneralRasterElevHandler.h
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 //
3 // License: see top level LICENSE.txt
4 //
5 // Author: Garrett Potts
6 //
7 // Description:
8 //
9 //
10 //----------------------------------------------------------------------------
11 // $Id: ossimGeneralRasterElevHandler.h 23117 2015-01-29 22:33:13Z okramer $
12 #ifndef ossimGeneralRasterElevHandler_HEADER
13 #define ossimGeneralRasterElevHandler_HEADER
14 #include <list>
16 //#include <fstream>
17 
18 #include <ossim/base/ossimString.h>
19 #include <ossim/base/ossimDatum.h>
30 #include <ossim/base/ossimDpt.h>
31 #include <ossim/base/ossimGpt.h>
32 #include <mutex>
33 class ossimProjection;
38 {
39 public:
41  {
42  public:
44  :theWidth(0),
45  theHeight(0),
46  theNullHeightValue(ossim::nan()),
47  theScalarType(OSSIM_SCALAR_UNKNOWN),
48  theBytesPerRawLine(0),
49  theDatum(0),
50  theGeometry(0)
51  {
52  }
54  :theFilename(src.theFilename),
55  theImageRect(src.theImageRect),
56  theUl(src.theUl),
57  theLr(src.theLr),
58  theWidth(src.theWidth),
59  theHeight(src.theHeight),
60  theWgs84GroundRect(src.theWgs84GroundRect),
61  theNullHeightValue(src.theNullHeightValue),
62  theByteOrder(src.theByteOrder),
63  theScalarType(src.theScalarType),
64  theBytesPerRawLine(src.theBytesPerRawLine),
65  theDatum(src.theDatum),
66  theGeometry(src.theGeometry)
67  {
68  }
82  };
86 
89 
90  virtual ossimObject* dup() const { return new ossimGeneralRasterElevHandler(this->theFilename); }
91 
92 
97  virtual double getHeightAboveMSL(const ossimGpt&);
98 
104  virtual ossimIpt getSizeOfElevCell() const;
105 
111  virtual double getPostValue(const ossimIpt& gridPt) const;
112 
113  virtual bool isOpen()const;
114 
120  bool open(const ossimFilename& file, bool memoryMapFlag=false);
121 
125  virtual void close();
126 
132  ossimDrect getBoundingRect()const;
133 
142  virtual bool pointHasCoverage(const ossimGpt& gpt) const;
143 
144  const ossimGeneralRasterElevHandler::GeneralRasterInfo& generalRasterInfo()const;
145 
146 private:
147  template <class T>
148  double getHeightAboveMSLFileTemplate(T dummy,
150  const ossimGpt& gpt);
151  template <class T>
152  double getHeightAboveMSLMemoryTemplate(T dummy,
154  const ossimGpt& gpt);
155 
156  virtual bool setFilename(const ossimFilename& file);
157 
159  mutable std::mutex m_inputStreamMutex;
161 
164 
165  std::vector<char> m_memoryMap;
166 TYPE_DATA
167 };
168 
169 #endif /* End of "#ifndef ossimGeneralRasterElevHandler_HEADER" */
virtual double getHeightAboveMSL(const ossimGpt &)=0
Height access methods:
std::basic_ifstream< char > ifstream
Class for char input file streams.
Definition: ossimIosFwd.h:44
double nan()
Method to return ieee floating point double precision NAN.
Definition: ossimCommon.h:135
This code was derived from https://gist.github.com/mshockwave.
Definition: Barrier.h:8
double ossim_float64
virtual bool pointHasCoverage(const ossimGpt &) const
METHOD: pointIsInsideRect() Method to check if the ground point elevation is defined: ...
virtual bool open(const ossimFilename &, bool=false)
ossimGeneralRasterElevHandler::GeneralRasterInfo theGeneralRasterInfo
#define TYPE_DATA
Definition: ossimRtti.h:339
virtual double getPostValue(const ossimIpt &gridPt) const =0
METHOD: getPostValue Returns the value at a given grid point as a double.
unsigned int ossim_uint32
ossimByteOrder
ossimScalarType
#define OSSIM_DLL
bool m_streamOpen
true if stream is open.
GeneralRasterInfo(const ossimGeneralRasterElevHandler::GeneralRasterInfo &src)
virtual ossimIpt getSizeOfElevCell() const =0
METHOD: getSizeOfElevCell Returns the number of post in the cell.