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

#include <ossimGeneralRasterElevationDatabase.h>

Inheritance diagram for ossimGeneralRasterElevationDatabase:
ossimElevationCellDatabase ossimElevationDatabase ossimElevSource ossimSource ossimConnectableObject ossimErrorStatusInterface ossimObject ossimListenerManager ossimPropertyInterface ossimReferenced

Public Member Functions

 ossimGeneralRasterElevationDatabase ()
 
 ossimGeneralRasterElevationDatabase (const ossimGeneralRasterElevationDatabase &rhs)
 
virtual ~ossimGeneralRasterElevationDatabase ()
 
virtual ossimObjectdup () const
 
virtual bool open (const ossimString &connectionString)
 Open a connection to a database. More...
 
virtual bool pointHasCoverage (const ossimGpt &gpt) const
 METHOD: pointHasCoverage(gpt) Returns TRUE if coverage exists over gpt: More...
 
virtual bool getAccuracyInfo (ossimElevationAccuracyInfo &, const ossimGpt &) const
 
virtual double getHeightAboveMSL (const ossimGpt &)
 METHODS: accuracyLE90(), accuracyCE90() Returns the vertical and horizontal accuracy (90% confidence) in the region of gpt: More...
 
virtual double getHeightAboveEllipsoid (const ossimGpt &gpt)
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual ossim_uint64 createId (const ossimGpt &) const
 
virtual std::ostream & print (std::ostream &out) const
 Outputs theErrorStatus as an ossimErrorCode and an ossimString. More...
 
- Public Member Functions inherited from ossimElevationCellDatabase
 ossimElevationCellDatabase ()
 
 ossimElevationCellDatabase (const ossimElevationCellDatabase &src)
 
virtual ossim_uint32 getMinOpenCells () const
 
virtual ossim_uint32 getMaxOpenCells () const
 
virtual void setMinMaxOpenCells (ossim_uint64 minCellCount, ossim_uint64 maxCellCount)
 
virtual bool getMemoryMapCellsFlag () const
 
virtual void setMemoryMapCellsFlag (bool flag)
 
virtual void getOpenCellList (std::vector< ossimFilename > &list) const
 
void getCellsForBounds (const ossim_float64 &minLat, const ossim_float64 &minLon, const ossim_float64 &maxLat, const ossim_float64 &maxLon, std::vector< ossimFilename > &cells, ossim_uint32 maxNumberOfCells=0)
 Gets a list of elevation cells needed to cover bounding box. More...
 
virtual ossimRefPtr< ossimElevCellHandlergetOrCreateCellHandler (const ossimGpt &gpt)
 
- Public Member Functions inherited from ossimElevationDatabase
 ossimElevationDatabase ()
 
 ossimElevationDatabase (const ossimElevationDatabase &src)
 
virtual double getMeanSpacingMeters () const
 METHOD: meanSpacingMeters() This method returns the post spacing in the region of gpt: More...
 
virtual void setGeoid (ossimGeoid *geoid)
 
ossimGeoidgetGeoid ()
 
const ossimGeoidgetGeoid () const
 
const ossimStringgetConnectionString () const
 
- Public Member Functions inherited from ossimElevSource
bool intersectRay (const ossimEcefRay &ray, ossimGpt &gpt, double defaultElevValue=0.0)
 METHOD: intersectRay() More...
 
virtual double getMinHeightAboveMSL () const
 Access methods for the bounding elevations: More...
 
virtual double getMaxHeightAboveMSL () const
 
double getNullHeightValue () const
 Special numeric quantities as defined by this source: More...
 
double getSeaLevelValue () const
 
virtual const ossimGrectgetBoundingGndRect () const
 METHODS: accuracyLE90(), accuracyCE90() Returns the vertical and horizontal accuracy (90% confidence) in the region of gpt: More...
 
virtual bool canConnectMyInputTo (ossim_int32 inputIndex, const ossimConnectableObject *object) const
 required to be overriden by derived classes More...
 
virtual void initialize ()
 Implement ossimSource base-class pure virtuals: More...
 
virtual bool getComputeStatisticsFlag () const
 Opens a stream to an elevation cell. More...
 
virtual void setComputeStatisticsFlag (bool flag)
 Sets the flag which controls whether or not statistics will be computed upon opening a cell and not finding a corresponding statistics file. More...
 
- Public Member Functions inherited from ossimSource
 ossimSource (ossimObject *owner=0)
 
 ossimSource (ossimObject *owner, ossim_uint32 inputListSize, ossim_uint32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true)
 
virtual ~ossimSource ()
 
virtual bool isSourceEnabled () const
 
virtual void enableSource ()
 
virtual void disableSource ()
 
virtual bool getEnableFlag () const
 
virtual void setEnableFlag (bool flag)
 
virtual bool isInitialized () const
 
virtual void setInitializedFlag (bool flag)
 
virtual void setProperty (ossimRefPtr< ossimProperty > property)
 
virtual ossimRefPtr< ossimPropertygetProperty (const ossimString &name) const
 
virtual void getPropertyNames (std::vector< ossimString > &propertyNames) const
 
- Public Member Functions inherited from ossimConnectableObject
 ossimConnectableObject (ossimObject *owner=0)
 Base constructor of this object. More...
 
 ossimConnectableObject (ossimObject *owner, ossim_int32 inputListSize, ossim_int32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true)
 
virtual ~ossimConnectableObject ()
 
void setId (const ossimId &id)
 All connectable objects will have id's. More...
 
const ossimIdgetId () const
 Will allow us to get this object's id. More...
 
const ossimObjectgetOwner () const
 Fetches the current owner, most likely a container but not limited to one. More...
 
virtual void changeOwner (ossimObject *owner)
 Permits changing the object's owner. More...
 
virtual void setDescription (const ossimString &description)
 
virtual ossimString getDescription () const
 
virtual bool isConnected (ossimConnectableObjectDirectionType direction=CONNECTABLE_DIRECTION_INPUT) const
 will check the direction specified to see if all slots are full. More...
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findConnectableObject(const ossimId &id))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findObjectOfType(RTTItypeid typeId, ossimConnectableObjectDirectionType directionType, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findObjectOfType(const ossimString &obj, ossimConnectableObjectDirectionType directionType, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findInputObjectOfType(const ossimString &className))
 
virtual ossim_int32 findInputIndex (const ossimConnectableObject *object)
 Return a valid index of the input list if the passed in object is found else return -1. More...
 
virtual ossim_int32 findInputIndex (const ossimId &id)
 Return a valid index of the input list if the passed id is found else return -1. More...
 
virtual ossim_int32 findOutputIndex (const ossimConnectableObject *object)
 Return a valid index of the output list if the passed in object is found else return -1. More...
 
virtual ossim_int32 findOutputIndex (const ossimId &id)
 Return a valid index of the output list if the passed in object is found else return -1. More...
 
virtual ossim_int32 getMyInputIndexToConnectTo (ossimConnectableObject *object) const
 Should return the first available index to connect to. More...
 
virtual ossim_int32 getMyOutputIndexToConnectTo (ossimConnectableObject *object) const
 Should return the first available index to connect to. More...
 
virtual bool canConnectMyOutputTo (ossim_int32 myOutputIndex, const ossimConnectableObject *object) const
 default implementation is to allow anyone to connect to us. More...
 
virtual void disconnect (ossimConnectableObject *object=0)
 Will disconnect the object passed in. More...
 
virtual void disconnect (const ossimId &id)
 Will disconnect the object passed in. More...
 
virtual ossimRefPtr< ossimConnectableObjectdisconnectMyInput (ossim_int32 inputIndex, bool disconnectOutputFlag=true, bool createEventFlag=true)
 Will disconnect the object at the given input index and generate a connection event. More...
 
virtual void disconnectMyInput (ossimConnectableObject *input, bool disconnectOutputFlag=true, bool createEventFlag=true)
 Finds the index of the passed in input and calls disconnectMyInput(inputIndex, disconnectOutputFlag, createEventFlag);. More...
 
virtual void disconnectMyInputs (ConnectableObjectList &inputList, bool disconnectOutputFlag=true, bool createEventFlag=true)
 
virtual ossimRefPtr< ossimConnectableObjectdisconnectMyOutput (ossim_int32 outputIndex, bool disconnectInputFlag=true, bool createEventFlag=true)
 Will disconnect the object at the given output index and generate a connection event. More...
 
virtual void disconnectMyOutput (ossimConnectableObject *output, bool disconnectInputFlag=true, bool createEventFlag=true)
 Will disconnect the output object. More...
 
virtual void disconnectMyOutputs (ConnectableObjectList &outputList, bool disconnectOutputFlag=true, bool createEventFlag=true)
 
virtual void disconnectAllInputs ()
 Will disconnect all of the input objects. More...
 
virtual void disconnectAllOutputs ()
 Will disconnect all of the output objects. More...
 
virtual ossim_int32 connectMyInputTo (ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
 Will try to connect this objects input to the passed in object. More...
 
virtual ossim_int32 connectMyInputTo (ossim_int32 inputIndex, ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
 Will connect the specified input to the passed in object. More...
 
virtual bool connectMyInputTo (ConnectableObjectList &inputList, bool makeOutputConnection=true, bool createEventFlag=true)
 
virtual ossim_int32 connectMyOutputTo (ossimConnectableObject *outputObject, bool makeInputConnection=true, bool createEventFlag=true)
 Will try to connect this objects output to the passed in object. More...
 
virtual bool connectMyOutputTo (ConnectableObjectList &outputList, bool makeInputConnection=true, bool createEventFlag=true)
 
virtual bool connectInputList (ConnectableObjectList &inputList)
 Will disconnect itself from all inputs and reset to the passed in input list. More...
 
virtual bool connectOutputList (ConnectableObjectList &outputList)
 Will disconnect itself from all outputs and reset to the passed in output list. More...
 
virtual ossim_uint32 getNumberOfInputs () const
 Returns the number of input objects. More...
 
virtual ossim_uint32 getNumberOfOutputs () const
 Return the number of output objects. More...
 
ossimConnectableObjectgetInput (ossim_uint32 index=0)
 returns the object at the specified index. More...
 
const ossimConnectableObjectgetInput (ossim_uint32 index=0) const
 returns the object at the specified index. More...
 
ossimConnectableObjectgetOutput (ossim_uint32 index=0)
 returns the object at the specified index. More...
 
const ossimConnectableObjectgetOutput (ossim_uint32 index=0) const
 returns the object at the specified index. More...
 
virtual void setNumberOfInputs (ossim_int32 numberOfInputs)
 Will set the number of inputs. More...
 
virtual bool getInputListIsFixedFlag () const
 
virtual bool getOutputListIsFixedFlag () const
 
virtual void setNumberOfOutputs (ossim_int32 numberOfInputs)
 Will set the number of outputs. More...
 
const ConnectableObjectListgetInputList () const
 
const ConnectableObjectListgetOutputList () const
 
ConnectableObjectListgetInputList ()
 
ConnectableObjectListgetOutputList ()
 
 OSSIM_DEPRECATE_METHOD (virtual void findAllObjectsOfType(ConnectableObjectList &result, const RTTItypeid &typeInfo, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual void findAllObjectsOfType(ConnectableObjectList &result, const ossimString &className, bool recurse=true))
 
virtual void propagateEventToOutputs (ossimEvent &event)
 
virtual void propagateEventToInputs (ossimEvent &event)
 
virtual void setProperty (const ossimString &name, const ossimString &value)
 
virtual ossim_uint32 saveStateOfAllInputs (ossimKeywordlist &kwl, bool saveThisStateFlag=true, ossim_uint32 objectIndex=1, const char *prefix=0) const
 Save the state of all inputs to a keyword list. More...
 
virtual bool fillContainer (ossimConnectableContainer &container)
 Inserts this object and all of its children and inputs into the container provided. More...
 
bool moveInputUp (const ossimId &id)
 Moves the input connection matching id up one in the connection list. More...
 
bool moveInputDown (const ossimId &id)
 Moves the input connection matching id down one in the connection list. More...
 
bool moveInputToTop (const ossimId &id)
 Moves the input connection matching id to the top of the connection list. More...
 
bool moveInputToBottom (const ossimId &id)
 Moves the input connection matching id to the bottom of the connection list. More...
 
virtual void accept (ossimVisitor &visitor)
 We will add a visitor interface for all connectable objects. More...
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getClassName () const
 
virtual RTTItypeid getType () const
 
virtual bool canCastTo (ossimObject *obj) const
 
virtual bool canCastTo (const RTTItypeid &id) const
 
virtual bool canCastTo (const ossimString &parentClassName) const
 
virtual bool isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 
- Public Member Functions inherited from ossimListenerManager
 ossimListenerManager ()
 
virtual ~ossimListenerManager ()
 
virtual void fireEvent (ossimEvent &event)
 
virtual bool addListener (ossimListener *listener)
 
virtual bool removeListener (ossimListener *listener)
 
virtual bool findListener (ossimListener *listener)
 
- Public Member Functions inherited from ossimPropertyInterface
 ossimPropertyInterface ()
 
virtual ~ossimPropertyInterface ()
 
virtual ossimString getPropertyValueAsString (const ossimString &name) const
 
void getPropertyList (std::vector< ossimRefPtr< ossimProperty > > &propertyList) const
 
void setProperties (std::vector< ossimRefPtr< ossimProperty > > &propertyList)
 
- Public Member Functions inherited from ossimErrorStatusInterface
 ossimErrorStatusInterface ()
 
virtual ~ossimErrorStatusInterface ()
 
virtual ossimErrorCode getErrorStatus () const
 
virtual ossimString getErrorStatusString () const
 
virtual void setErrorStatus (ossimErrorCode error_status) const
 
virtual void setErrorStatus () const
 
virtual void clearErrorStatus () const
 
bool hasError () const
 

Protected Member Functions

bool openGeneralRasterDirectory (const ossimFilename &dir)
 
void createRelativePath (ossimFilename &file, const ossimGpt &gpt) const
 
void createFullPath (ossimFilename &file, const ossimGpt &gpt) const
 
ossimRefPtr< ossimElevCellHandlercreateHandler (const ossimGpt &)
 
virtual ossimRefPtr< ossimElevCellHandlercreateCell (const ossimGpt &)
 
- Protected Member Functions inherited from ossimElevationCellDatabase
virtual void remove (ossim_uint64 id)
 
void flushCacheToMinOpenCells ()
 
- Protected Member Functions inherited from ossimElevationDatabase
virtual ~ossimElevationDatabase ()
 
virtual double getOffsetFromEllipsoid (const ossimGpt &gpt)
 
- Protected Member Functions inherited from ossimElevSource
virtual ~ossimElevSource ()
 
 ossimElevSource ()
 Constructors/Destructors: More...
 
 ossimElevSource (const ossimElevSource &src)
 
- Protected Member Functions inherited from ossimSource
 ossimSource (const ossimSource &rhs)
 
const ossimSourceoperator= (const ossimSource &rhs)
 
- Protected Member Functions inherited from ossimConnectableObject
ossimConnectableObjectfindObjectOfType (ConnectableObjectList *connectableList, ossimVisitor &visitor)
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 
- Protected Member Functions inherited from ossimListenerManager
 ossimListenerManager (const ossimListenerManager &rhs)
 

Protected Attributes

ossimRefPtr< ossimGeneralRasterElevHandlerm_cellHandler
 
- Protected Attributes inherited from ossimElevationCellDatabase
ossim_uint32 m_minOpenCells
 
ossim_uint32 m_maxOpenCells
 
std::mutex m_cacheMapMutex
 
CellMap m_cacheMap
 
ossim_uint32 m_memoryMapCellsFlag
 
 TYPE_DATA
 
- Protected Attributes inherited from ossimElevationDatabase
ossimString m_connectionString
 
ossimRefPtr< ossimGeoidm_geoid
 
ossim_float64 m_meanSpacing
 
- Protected Attributes inherited from ossimElevSource
double theMinHeightAboveMSL
 Data members: More...
 
double theMaxHeightAboveMSL
 
double theNullHeightValue
 
double theSeaLevelValue
 
ossimGrect theGroundRect
 
bool theComputeStatsFlag
 
- Protected Attributes inherited from ossimSource
bool theEnableFlag
 
bool theInitializedFlag
 
- Protected Attributes inherited from ossimConnectableObject
ossimId theId
 
ossimString theDescription
 
ossimObjecttheOwner
 
bool theInputListIsFixedFlag
 Indicates whether the theInputObjectList is fixed. More...
 
bool theOutputListIsFixedFlag
 Indicates whether the theOutputObjectList is fixed. More...
 
ConnectableObjectList theInputObjectList
 Holds a list of input objects. More...
 
ConnectableObjectList theOutputObjectList
 Holds a list of output objects. More...
 
- Protected Attributes inherited from ossimListenerManager
std::list< ossimListener * > theListenerList
 
bool theEnabledFlag
 
std::list< ossimListener * > theDelayedAdd
 
std::list< ossimListener * > theDelayedRemove
 
bool theFireEventFlag
 
- Protected Attributes inherited from ossimErrorStatusInterface
ossimErrorCode theErrorStatus
 

Additional Inherited Members

- Public Types inherited from ossimElevationCellDatabase
typedef std::map< ossim_uint64, ossimRefPtr< CellInfo > > CellMap
 
- Public Types inherited from ossimConnectableObject
enum  ossimConnectableObjectDirectionType { CONNECTABLE_DIRECTION_NONE = 0, CONNECTABLE_DIRECTION_INPUT = 1, CONNECTABLE_DIRECTION_OUTPUT = 2 }
 
typedef std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
 

Detailed Description

Definition at line 9 of file ossimGeneralRasterElevationDatabase.h.

Constructor & Destructor Documentation

◆ ossimGeneralRasterElevationDatabase() [1/2]

ossimGeneralRasterElevationDatabase::ossimGeneralRasterElevationDatabase ( )
inline

◆ ossimGeneralRasterElevationDatabase() [2/2]

ossimGeneralRasterElevationDatabase::ossimGeneralRasterElevationDatabase ( const ossimGeneralRasterElevationDatabase rhs)
inline

◆ ~ossimGeneralRasterElevationDatabase()

virtual ossimGeneralRasterElevationDatabase::~ossimGeneralRasterElevationDatabase ( )
inlinevirtual

Definition at line 20 of file ossimGeneralRasterElevationDatabase.h.

21  {
22  if(m_cellHandler.valid())
23  {
25  }
26  m_cellHandler = 0;
27  }
bool valid() const
Definition: ossimRefPtr.h:75
ossimRefPtr< ossimGeneralRasterElevHandler > m_cellHandler
virtual void close()
Closes the stream to the file.

Member Function Documentation

◆ createCell()

ossimRefPtr< ossimElevCellHandler > ossimGeneralRasterElevationDatabase::createCell ( const ossimGpt gpt)
protectedvirtual

Reimplemented from ossimElevationCellDatabase.

Definition at line 111 of file ossimGeneralRasterElevationDatabase.cpp.

References ossimRefPtr< T >::get(), m_cellHandler, and pointHasCoverage().

112 {
113  if(pointHasCoverage(gpt))
114  {
115  return m_cellHandler.get();
116  }
117  return 0;
118 }
virtual bool pointHasCoverage(const ossimGpt &gpt) const
METHOD: pointHasCoverage(gpt) Returns TRUE if coverage exists over gpt:
ossimRefPtr< ossimGeneralRasterElevHandler > m_cellHandler

◆ createFullPath()

void ossimGeneralRasterElevationDatabase::createFullPath ( ossimFilename file,
const ossimGpt gpt 
) const
inlineprotected

Definition at line 74 of file ossimGeneralRasterElevationDatabase.h.

References ossimFilename::dirCat().

75  {
76  ossimFilename relativeFile;
77  createRelativePath(relativeFile, gpt);
78  file = ossimFilename(m_connectionString).dirCat(relativeFile);
79  }
void createRelativePath(ossimFilename &file, const ossimGpt &gpt) const
ossimFilename dirCat(const ossimFilename &file) const

◆ createHandler()

ossimRefPtr< ossimElevCellHandler > ossimGeneralRasterElevationDatabase::createHandler ( const ossimGpt gpt)
protected

Definition at line 102 of file ossimGeneralRasterElevationDatabase.cpp.

References ossimRefPtr< T >::get(), m_cellHandler, and pointHasCoverage().

103 {
104  if(pointHasCoverage(gpt))
105  {
106  return m_cellHandler.get();
107  }
108  return 0;
109 }
virtual bool pointHasCoverage(const ossimGpt &gpt) const
METHOD: pointHasCoverage(gpt) Returns TRUE if coverage exists over gpt:
ossimRefPtr< ossimGeneralRasterElevHandler > m_cellHandler

◆ createId()

virtual ossim_uint64 ossimGeneralRasterElevationDatabase::createId ( const ossimGpt ) const
inlinevirtual

Reimplemented from ossimElevationCellDatabase.

Definition at line 63 of file ossimGeneralRasterElevationDatabase.h.

64  {
65  return 0;
66  }

◆ createRelativePath()

void ossimGeneralRasterElevationDatabase::createRelativePath ( ossimFilename file,
const ossimGpt gpt 
) const
protected

Definition at line 97 of file ossimGeneralRasterElevationDatabase.cpp.

99 {
100 }

◆ dup()

virtual ossimObject* ossimGeneralRasterElevationDatabase::dup ( ) const
inlinevirtual

Implements ossimElevSource.

Definition at line 29 of file ossimGeneralRasterElevationDatabase.h.

References open().

◆ getAccuracyInfo()

virtual bool ossimGeneralRasterElevationDatabase::getAccuracyInfo ( ossimElevationAccuracyInfo ,
const ossimGpt  
) const
inlinevirtual

Reimplemented from ossimElevationDatabase.

Definition at line 39 of file ossimGeneralRasterElevationDatabase.h.

40  {
41  return false;
42  }

◆ getHeightAboveEllipsoid()

double ossimGeneralRasterElevationDatabase::getHeightAboveEllipsoid ( const ossimGpt gpt)
virtual

Reimplemented from ossimElevSource.

Definition at line 21 of file ossimGeneralRasterElevationDatabase.cpp.

References getHeightAboveMSL(), ossimElevationDatabase::getOffsetFromEllipsoid(), and ossim::nan().

22 {
23  double h = getHeightAboveMSL(gpt);
24  if(h != ossim::nan())
25  {
26  h += getOffsetFromEllipsoid(gpt);
27  }
28 
29  return h;
30 }
double nan()
Method to return ieee floating point double precision NAN.
Definition: ossimCommon.h:135
virtual double getHeightAboveMSL(const ossimGpt &)
METHODS: accuracyLE90(), accuracyCE90() Returns the vertical and horizontal accuracy (90% confidence)...
virtual double getOffsetFromEllipsoid(const ossimGpt &gpt)

◆ getHeightAboveMSL()

double ossimGeneralRasterElevationDatabase::getHeightAboveMSL ( const ossimGpt gpt)
virtual

METHODS: accuracyLE90(), accuracyCE90() Returns the vertical and horizontal accuracy (90% confidence) in the region of gpt:

Implements ossimElevSource.

Definition at line 10 of file ossimGeneralRasterElevationDatabase.cpp.

References ossimElevSource::getHeightAboveMSL(), ossimElevationCellDatabase::getOrCreateCellHandler(), ossimSource::isSourceEnabled(), ossim::nan(), and ossimRefPtr< T >::valid().

Referenced by getHeightAboveEllipsoid().

11 {
12  if(!isSourceEnabled()) return ossim::nan();
14 
15  if(handler.valid())
16  {
17  return handler->getHeightAboveMSL(gpt); // still need to shift
18  }
19  return ossim::nan();
20 }
virtual bool isSourceEnabled() const
Definition: ossimSource.cpp:79
virtual double getHeightAboveMSL(const ossimGpt &)=0
Height access methods:
bool valid() const
Definition: ossimRefPtr.h:75
double nan()
Method to return ieee floating point double precision NAN.
Definition: ossimCommon.h:135
virtual ossimRefPtr< ossimElevCellHandler > getOrCreateCellHandler(const ossimGpt &gpt)

◆ loadState()

bool ossimGeneralRasterElevationDatabase::loadState ( const ossimKeywordlist kwl,
const char *  prefix = 0 
)
virtual

Method to the load (recreate) the state of the object from a keyword list. Return true if ok or false on error.

Reimplemented from ossimElevationCellDatabase.

Definition at line 121 of file ossimGeneralRasterElevationDatabase.cpp.

References ossimString::empty(), ossimFilename::exists(), ossimElevationCellDatabase::loadState(), ossimElevationDatabase::m_connectionString, and open().

122 {
123  bool result = ossimElevationCellDatabase::loadState(kwl, prefix);
124  if(result)
125  {
127  {
128  result = open(m_connectionString);
129  }
130  else
131  {
132  // can't open the connection because it does not exists or empty
133  result = false;
134  }
135  }
136 
137  return result;
138 }
virtual bool open(const ossimString &connectionString)
Open a connection to a database.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
bool exists() const
bool empty() const
Definition: ossimString.h:411

◆ open()

bool ossimGeneralRasterElevationDatabase::open ( const ossimString connectionString)
virtual

Open a connection to a database.

In most cases this will be a pointer to a directory like in a Dted directory reader.

Implements ossimElevationDatabase.

Definition at line 31 of file ossimGeneralRasterElevationDatabase.cpp.

References ossimElevationDatabase::m_connectionString, and openGeneralRasterDirectory().

Referenced by dup(), and loadState().

32 {
33  bool result = false;
34  ossimFilename file = ossimFilename(connectionString);
35  m_connectionString = connectionString;
36  result = openGeneralRasterDirectory(file);
37 
38  return result;
39 }

◆ openGeneralRasterDirectory()

bool ossimGeneralRasterElevationDatabase::openGeneralRasterDirectory ( const ossimFilename dir)
protected

Definition at line 41 of file ossimGeneralRasterElevationDatabase.cpp.

References ossimString::downcase(), ossimFilename::exists(), ossimFilename::ext(), ossimDirectory::getFirst(), ossimElevCellHandler::getMeanSpacingMeters(), ossimDirectory::getNext(), ossimFilename::isDir(), m_cellHandler, ossimElevationDatabase::m_meanSpacing, ossimElevationCellDatabase::m_memoryMapCellsFlag, ossimGeneralRasterElevHandler::open(), and ossimRefPtr< T >::valid().

Referenced by open().

42 {
44  bool foundOne = false;
45 
46  if(dir.exists())
47  {
48  if(dir.isDir())
49  {
50  ossimDirectory d(dir);
51 
52  ossimFilename file;
53  ossim_uint32 maxCount = 10; // search at least the first 10 files to see if there are any here
54  ossim_uint32 count = 0;
55  if(d.getFirst(file))
56  {
57  do
58  {
59  ++count;
60  ossimString ext = file.ext();
61  ext = ext.downcase();
62  if(ext == "ras")
63  {
65  {
67  foundOne = true;
68  }
69  }
70  } while(d.getNext(file) &&
71  (foundOne ||
72  (!foundOne && (count < maxCount))));
73  }
74  }
75  }
76 
77  if(!foundOne)
78  {
79  m_cellHandler = 0;
80  }
81 
82  return m_cellHandler.valid();
83 }
virtual double getMeanSpacingMeters() const
METHOD: meanSpacingMeters() Implements pure virtual for.
bool open(const ossimFilename &file, bool memoryMapFlag=false)
Opens a stream to the srtm cell.
bool valid() const
Definition: ossimRefPtr.h:75
bool isDir() const
bool exists() const
unsigned int ossim_uint32
static ossimString downcase(const ossimString &aString)
Definition: ossimString.cpp:48
ossimRefPtr< ossimGeneralRasterElevHandler > m_cellHandler
ossimString ext() const

◆ pointHasCoverage()

bool ossimGeneralRasterElevationDatabase::pointHasCoverage ( const ossimGpt ) const
virtual

METHOD: pointHasCoverage(gpt) Returns TRUE if coverage exists over gpt:

Implements ossimElevSource.

Definition at line 85 of file ossimGeneralRasterElevationDatabase.cpp.

References m_cellHandler, ossimGeneralRasterElevHandler::pointHasCoverage(), and ossimRefPtr< T >::valid().

Referenced by createCell(), and createHandler().

86 {
87  bool result = false;
88 
89  if(m_cellHandler.valid())
90  {
91  result = m_cellHandler->pointHasCoverage(gpt);
92  }
93 
94  return result;
95 }
bool valid() const
Definition: ossimRefPtr.h:75
virtual bool pointHasCoverage(const ossimGpt &gpt) const
Loops through ossimGeneralRasterElevHandler::BoundingRectListType and checks for coverage.
ossimRefPtr< ossimGeneralRasterElevHandler > m_cellHandler

◆ print()

std::ostream & ossimGeneralRasterElevationDatabase::print ( std::ostream &  out) const
virtual

Outputs theErrorStatus as an ossimErrorCode and an ossimString.

Returns
std::ostream&
Note
Derived classes should only have to implement a virtual print, not an operator<< funtion as it's implemented here.

Reimplemented from ossimElevationCellDatabase.

Definition at line 148 of file ossimGeneralRasterElevationDatabase.cpp.

References saveState().

149 {
150  ossimKeywordlist kwl;
151  saveState(kwl);
152  out << "\nossimGeneralRasterElevationDatabase @ "<< (ossim_uint64) this << "\n"
153  << kwl <<ends;
154  return out;
155 }
Represents serializable keyword/value map.
unsigned long long ossim_uint64
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const

◆ saveState()

bool ossimGeneralRasterElevationDatabase::saveState ( ossimKeywordlist kwl,
const char *  prefix = 0 
) const
virtual

Method to save the state of the object to a keyword list. Return true if ok or false on error.

Reimplemented from ossimElevationCellDatabase.

Definition at line 140 of file ossimGeneralRasterElevationDatabase.cpp.

References ossimElevationCellDatabase::saveState().

Referenced by print().

141 {
142  bool result = ossimElevationCellDatabase::saveState(kwl, prefix);
143 
144  return result;
145 }
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const

Member Data Documentation

◆ m_cellHandler

ossimRefPtr<ossimGeneralRasterElevHandler> ossimGeneralRasterElevationDatabase::m_cellHandler
protected

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