Skip to content
Snippets Groups Projects
Commit 7fd8703d authored by Stéphane Albert's avatar Stéphane Albert
Browse files

ENH: MANTIS-1071 Added otb::DEMHandler::ClearDEMs() method.

parent 27f75a1f
No related branches found
No related tags found
No related merge requests found
...@@ -132,6 +132,11 @@ public: ...@@ -132,6 +132,11 @@ public:
/** Get Goid file */ /** Get Goid file */
std::string GetGeoidFile() const; std::string GetGeoidFile() const;
/**
* Removes all the ossimElevationDatabases from the ossimElevManager.
*/
void ClearDEMs();
protected: protected:
DEMHandler(); DEMHandler();
virtual ~DEMHandler() {} virtual ~DEMHandler() {}
......
...@@ -62,8 +62,7 @@ void ...@@ -62,8 +62,7 @@ void
DEMHandler DEMHandler
::OpenDEMDirectory(const char* DEMDirectory) ::OpenDEMDirectory(const char* DEMDirectory)
{ {
ossimFilename ossimDEMDir; ossimFilename ossimDEMDir( DEMDirectory );
ossimDEMDir = ossimFilename(DEMDirectory);
if (!m_ElevManager->loadElevationPath(ossimDEMDir)) if (!m_ElevManager->loadElevationPath(ossimDEMDir))
{ {
...@@ -87,6 +86,18 @@ DEMHandler ...@@ -87,6 +86,18 @@ DEMHandler
} }
} }
void
DEMHandler
::ClearDEMs()
{
assert( ossimElevManager::instance()!=NULL );
assert( m_ElevManager!=NULL );
ossimElevManager::instance()->clear();
}
void void
DEMHandler DEMHandler
::OpenDEMDirectory(const std::string& DEMDirectory) ::OpenDEMDirectory(const std::string& DEMDirectory)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment