Commit 4c0aa1fa authored by Cédric Traizet's avatar Cédric Traizet

Merge branch 'gdal_dem_handler' into 'develop'

DEM handler based on GDAL

Closes #1762

See merge request !729
parents 8c43bc27 902b43d6
Pipeline #5890 passed with stages
in 7 minutes and 27 seconds
ENVI
samples = 1441
lines = 721
bands = 1
header offset = 24
file type = ENVI Standard
data type = 4
interleave = bsq
sensor type = Unknown
byte order = 1
wavelength units = Unknown
map info = {Geographic Lat/Lon, 1, 1,-0.125, 90.125, 0.25, 0.25,WGS-84}
coordinate system string = {GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]}
band names = {
Band 1}
ENVI
samples = 1441
lines = 721
bands = 1
header offset = 24
file type = ENVI Standard
data type = 4
interleave = bsq
sensor type = Unknown
byte order = 1
wavelength units = Unknown
map info = {Geographic Lat/Lon, 1, 1,-0.125, 90.125, 0.25, 0.25,WGS-84}
coordinate system string = {GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]}
band names = {
Band 1}
......@@ -20,17 +20,17 @@
/* Example usage:
./DEMToRainbowExample Output/DEMToRainbowImageGenerator.png 6.5 45.5 500 500 0.002 -0.002 Input/DEM_srtm
./DEMToRainbowExample Output/DEMToRainbowImageGenerator.png 6.5 45.5 500 500 0.002 -0.002 Input/DEM/srtm_directory_srtm
*/
/* Example usage:
./DEMToRainbowExample Output/DEMToHotImageGenerator.png 6.5 45.5 500 500 0.002 -0.002 Input/DEM_srtm hot
./DEMToRainbowExample Output/DEMToHotImageGenerator.png 6.5 45.5 500 500 0.002 -0.002 Input/DEM/srtm_directory hot
*/
/* Example usage:
./DEMToRainbowExample Output/DEMToReliefImageGenerator.png 6.5 45.5 500 500 0.002 -0.002 Input/DEM_srtm relief
./DEMToRainbowExample Output/DEMToReliefImageGenerator.png 6.5 45.5 500 500 0.002 -0.002 Input/DEM/srtm_directory relief
*/
#include "otbImageFileReader.h"
......@@ -70,7 +70,7 @@ int main(int argc, char* argv[])
using SpacingType = DEMToImageGeneratorType::SpacingType;
using PointType = DEMToImageGeneratorType::PointType;
otb::DEMHandler::Instance()->OpenDEMDirectory(argv[8]);
otb::DEMHandler::GetInstance().OpenDEMDirectory(argv[8]);
PointType origin;
origin[0] = ::atof(argv[2]);
......
......@@ -20,7 +20,7 @@
/* Example usage:
./HillShadingExample Output/HillShadingExample.png Output/HillShadingColorExample.png 6.5 45.5 500 500 0.002 -0.002 Input/DEM_srtm
./HillShadingExample Output/HillShadingExample.png Output/HillShadingColorExample.png 6.5 45.5 500 500 0.002 -0.002 Input/DEM/srtm_directory
*/
......@@ -71,7 +71,7 @@ int main(int argc, char* argv[])
using SpacingType = DEMToImageGeneratorType::SpacingType;
using PointType = DEMToImageGeneratorType::PointType;
otb::DEMHandler::Instance()->OpenDEMDirectory(argv[9]);
otb::DEMHandler::GetInstance().OpenDEMDirectory(argv[9]);
PointType origin;
origin[0] = ::atof(argv[3]);
......
......@@ -51,7 +51,7 @@ otb_add_test(NAME bfTeDEMToRainbowExampleTest COMMAND ${OTB_TEST_DRIVER}
${TEMP}/DEMToRainbowImageGenerator.png
Execute $<TARGET_FILE:DEMToRainbowExample>
${TEMP}/DEMToRainbowImageGenerator.png
6.5 45.5 500 500 0.002 -0.002 ${OTB_DATA_ROOT}/Input/DEM_srtm
6.5 45.5 500 500 0.002 -0.002 ${OTB_DATA_ROOT}/Input/DEM/srtm_directory
)
......@@ -139,5 +139,5 @@ otb_add_test(NAME bfTeHillShadingExampleTest COMMAND ${OTB_TEST_DRIVER}
Execute $<TARGET_FILE:HillShadingExample>
${TEMP}/HillShadingExample.png
${TEMP}/HillShadingColorExample.png
6.8 45.3 500 500 0.002 -0.002 ${OTB_DATA_ROOT}/Input/DEM_srtm
6.8 45.3 500 500 0.002 -0.002 ${OTB_DATA_ROOT}/Input/DEM/srtm_directory
)
......@@ -114,7 +114,7 @@ int main(int argc, char* argv[])
using DisparityToElevationFilterType = otb::DisparityMapToDEMFilter<FloatImageType, FloatImageType, FloatImageType, FloatVectorImageType, FloatImageType>;
double avgElevation = atof(argv[5]);
otb::DEMHandler::Instance()->SetDefaultHeightAboveEllipsoid(avgElevation);
otb::DEMHandler::GetInstance().SetDefaultHeightAboveEllipsoid(avgElevation);
ImageReaderType::Pointer leftReader = ImageReaderType::New();
ImageReaderType::Pointer rightReader = ImageReaderType::New();
......
......@@ -54,7 +54,7 @@ int main(int argc, char* argv[])
// This class is a singleton, the New() method is deprecated and will be removed
// in future release. We need to use the \code{Instance()} method instead.
otb::DEMHandler::Pointer demHandler = otb::DEMHandler::Instance();
auto & demHandler = otb::DEMHandler::GetInstance();
bool fail = false;
......@@ -63,16 +63,16 @@ int main(int argc, char* argv[])
// allows inputting a geoid file as well. Last, a default height above ellipsoid
// can be set using the \code{SetDefaultHeightAboveEllipsoid()} method.
demHandler->SetDefaultHeightAboveEllipsoid(defaultHeight);
demHandler.SetDefaultHeightAboveEllipsoid(defaultHeight);
if (!demHandler->IsValidDEMDirectory(demdir.c_str()))
if (!demHandler.IsValidDEMDirectory(demdir.c_str()))
{
std::cerr << "IsValidDEMDirectory(" << demdir << ") = false" << std::endl;
fail = true;
}
demHandler->OpenDEMDirectory(demdir);
demHandler->OpenGeoidFile(geoid);
demHandler.OpenDEMDirectory(demdir);
demHandler.OpenGeoidFile(geoid);
// We can now retrieve height above ellipsoid or height above Mean Sea Level
// (MSL) using the methods \code{GetHeightAboveEllipsoid()} and
......@@ -104,10 +104,10 @@ int main(int argc, char* argv[])
double height = -32768;
height = demHandler->GetHeightAboveMSL(point);
height = demHandler.GetHeightAboveMSL(point);
std::cout << "height above MSL (" << longitude << "," << latitude << ") = " << height << " meters" << std::endl;
height = demHandler->GetHeightAboveEllipsoid(point);
height = demHandler.GetHeightAboveEllipsoid(point);
std::cout << "height above ellipsoid (" << longitude << ", " << latitude << ") = " << height << " meters" << std::endl;
// Note that OSSIM internal calls for sensor
......
......@@ -20,7 +20,7 @@
/* Example usage:
./DEMToImageGenerator Output/DEMToImageGenerator.tif Output/pretty_DEMToImageGenerator.png 6.5 45.5 500 500 0.002 -0.002 Input/DEM_srtm
./DEMToImageGenerator Output/DEMToImageGenerator.tif Output/pretty_DEMToImageGenerator.png 6.5 45.5 500 500 0.002 -0.002 Input/DEM/srtm_directory
*/
......@@ -83,7 +83,7 @@ int main(int argc, char* argv[])
WriterType::Pointer writer = WriterType::New();
// The path to the DEM folder is given to the \doxygen{otb}{DEMHandler}.
otb::DEMHandler::Instance()->OpenDEMDirectory(folderPath);
otb::DEMHandler::GetInstance().OpenDEMDirectory(folderPath);
// The origin (Longitude/Latitude) of the output image in the DEM is given to the filter.
PointType origin;
......
......@@ -49,13 +49,13 @@ otb_add_test(NAME ioTeDEMToImageGeneratorTest COMMAND ${OTB_TEST_DRIVER}
500
0.002
-0.002
${INPUTDATA}/DEM_srtm
${INPUTDATA}/DEM/srtm_directory
)
otb_add_test(NAME prTeDEMHandlerExampleTest COMMAND ${OTB_TEST_DRIVER}
Execute $<TARGET_FILE:DEMHandlerExample>
${INPUTDATA}/DEM_srtm
${INPUTDATA}/DEM_srtm/egm96.grd
${INPUTDATA}/DEM/srtm_directory
${INPUTDATA}/DEM/egm96.grd
40
8.434583
44.647083
......
......@@ -18,8 +18,8 @@
* limitations under the License.
*/
#ifndef otbDEMHandler_h
#define otbDEMHandler_h
#ifndef otbOssimDEMHandler_h
#define otbOssimDEMHandler_h
#include <cstdio>
......@@ -35,14 +35,14 @@ class ossimElevManager;
namespace otb
{
/** \class DEMHandler
/** \class OssimDEMHandler
*
* \brief Single access point for DEM data retrieval
*
* This class is the single configuration and access point for
* elevation handling in images projections and localization
* functions. Since this class is a singleton, there is no New() method. The
* DEMHandler::Instance() method should be used instead.
* OssimDEMHandler::Instance() method should be used instead.
*
* Please be aware that a proper instantiation and parameter setting
* of this class is advised before any call to geometric filters or
......@@ -87,11 +87,11 @@ namespace otb
* \ingroup OTBOSSIMAdapters
*/
class OTBOSSIMAdapters_EXPORT DEMHandler : public itk::Object
class OTBOSSIMAdapters_EXPORT OssimDEMHandler : public itk::Object
{
public:
/** Standard class typedefs. */
typedef DEMHandler Self;
typedef OssimDEMHandler Self;
typedef itk::Object Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
......@@ -102,7 +102,7 @@ public:
static Pointer Instance();
/** Run-time type information (and related methods). */
itkTypeMacro(DEMHandler, Object);
itkTypeMacro(OssimDEMHandler, Object);
/** Try to open the DEM directory. */
virtual void OpenDEMDirectory(const char* DEMDirectory);
......@@ -168,8 +168,8 @@ public:
void ClearDEMs();
protected:
DEMHandler();
~DEMHandler() override
OssimDEMHandler();
~OssimDEMHandler() override
{
}
......
......@@ -32,13 +32,14 @@ ENABLE_SHARED
OTBGDAL
OTBOssimPlugins
OTBOssim
TEST_DEPENDS
OTBTestKernel
OTBImageBase
OTBImageIO
OTBTransform
OTBProjection
OTBIOGDAL
DESCRIPTION
"${DOCUMENTATION}"
......
......@@ -19,13 +19,11 @@
#
set(OTBOSSIMAdapters_SRC
otbDEMHandler.cxx
otbOssimDEMHandler.cxx
otbImageKeywordlist.cxx
otbSensorModelAdapter.cxx
otbRPCSolverAdapter.cxx
otbDateTimeAdapter.cxx
otbEllipsoidAdapter.cxx
otbSarSensorModelAdapter.cxx
)
add_library(OTBOSSIMAdapters ${OTBOSSIMAdapters_SRC})
......
......@@ -57,7 +57,7 @@
#include "ossim/base/ossimNotify.h"
#endif
#include "otbSensorModelAdapter.h"
//#include "otbSensorModelAdapter.h"
#include <memory>
#include <boost/scoped_ptr.hpp>
#include <boost/algorithm/string/predicate.hpp>
......
......@@ -18,7 +18,7 @@
* limitations under the License.
*/
#include "otbDEMHandler.h"
#include "otbOssimDEMHandler.h"
#include "otbMacro.h"
#include <cassert>
......@@ -52,9 +52,9 @@
namespace otb
{
/** Initialize the singleton */
DEMHandler::Pointer DEMHandler::m_Singleton = nullptr;
OssimDEMHandler::Pointer OssimDEMHandler::m_Singleton = nullptr;
DEMHandler::Pointer DEMHandler::Instance()
OssimDEMHandler::Pointer OssimDEMHandler::Instance()
{
if (m_Singleton.GetPointer() == nullptr)
{
......@@ -62,7 +62,7 @@ DEMHandler::Pointer DEMHandler::Instance()
if (m_Singleton.GetPointer() == nullptr)
{
m_Singleton = new DEMHandler;
m_Singleton = new OssimDEMHandler;
}
m_Singleton->UnRegister();
}
......@@ -70,7 +70,7 @@ DEMHandler::Pointer DEMHandler::Instance()
return m_Singleton;
}
DEMHandler::DEMHandler() : m_GeoidFile(""), m_DefaultHeightAboveEllipsoid(0)
OssimDEMHandler::OssimDEMHandler() : m_GeoidFile(""), m_DefaultHeightAboveEllipsoid(0)
{
assert(ossimElevManager::instance() != NULL);
......@@ -79,7 +79,7 @@ DEMHandler::DEMHandler() : m_GeoidFile(""), m_DefaultHeightAboveEllipsoid(0)
ossimElevManager::instance()->setUseGeoidIfNullFlag(true);
}
void DEMHandler::OpenDEMDirectory(const char* DEMDirectory)
void OssimDEMHandler::OpenDEMDirectory(const char* DEMDirectory)
{
assert(ossimElevManager::instance() != NULL);
......@@ -108,7 +108,7 @@ void DEMHandler::OpenDEMDirectory(const char* DEMDirectory)
}
void DEMHandler::ClearDEMs()
void OssimDEMHandler::ClearDEMs()
{
assert(ossimElevManager::instance() != NULL);
......@@ -116,12 +116,12 @@ void DEMHandler::ClearDEMs()
}
void DEMHandler::OpenDEMDirectory(const std::string& DEMDirectory)
void OssimDEMHandler::OpenDEMDirectory(const std::string& DEMDirectory)
{
OpenDEMDirectory(DEMDirectory.c_str());
}
bool DEMHandler::IsValidDEMDirectory(const char* DEMDirectory)
bool OssimDEMHandler::IsValidDEMDirectory(const char* DEMDirectory)
{
assert(ossimElevManager::instance() != NULL);
......@@ -138,7 +138,7 @@ bool DEMHandler::IsValidDEMDirectory(const char* DEMDirectory)
return result;
}
bool DEMHandler::OpenGeoidFile(const char* geoidFile)
bool OssimDEMHandler::OpenGeoidFile(const char* geoidFile)
{
if ((ossimGeoidManager::instance()->findGeoidByShortName("geoid1996")) == nullptr)
{
......@@ -176,12 +176,12 @@ bool DEMHandler::OpenGeoidFile(const char* geoidFile)
return false;
}
bool DEMHandler::OpenGeoidFile(const std::string& geoidFile)
bool OssimDEMHandler::OpenGeoidFile(const std::string& geoidFile)
{
return OpenGeoidFile(geoidFile.c_str());
}
double DEMHandler::GetHeightAboveMSL(double lon, double lat) const
double OssimDEMHandler::GetHeightAboveMSL(double lon, double lat) const
{
double height;
ossimGpt ossimWorldPoint;
......@@ -196,12 +196,12 @@ double DEMHandler::GetHeightAboveMSL(double lon, double lat) const
return height;
}
double DEMHandler::GetHeightAboveMSL(const PointType& geoPoint) const
double OssimDEMHandler::GetHeightAboveMSL(const PointType& geoPoint) const
{
return GetHeightAboveMSL(geoPoint[0], geoPoint[1]);
}
double DEMHandler::GetHeightAboveEllipsoid(double lon, double lat) const
double OssimDEMHandler::GetHeightAboveEllipsoid(double lon, double lat) const
{
double height;
ossimGpt ossimWorldPoint;
......@@ -216,12 +216,12 @@ double DEMHandler::GetHeightAboveEllipsoid(double lon, double lat) const
return height;
}
double DEMHandler::GetHeightAboveEllipsoid(const PointType& geoPoint) const
double OssimDEMHandler::GetHeightAboveEllipsoid(const PointType& geoPoint) const
{
return GetHeightAboveEllipsoid(geoPoint[0], geoPoint[1]);
}
void DEMHandler::SetDefaultHeightAboveEllipsoid(double h)
void OssimDEMHandler::SetDefaultHeightAboveEllipsoid(double h)
{
// Ossim does not allow retrieving the default height above
// ellipsoid We therefore must keep it on our side
......@@ -232,21 +232,21 @@ void DEMHandler::SetDefaultHeightAboveEllipsoid(double h)
ossimElevManager::instance()->setDefaultHeightAboveEllipsoid(h);
}
double DEMHandler::GetDefaultHeightAboveEllipsoid() const
double OssimDEMHandler::GetDefaultHeightAboveEllipsoid() const
{
// Ossim does not allow retrieving the default height above
// ellipsoid We therefore must keep it on our side
return m_DefaultHeightAboveEllipsoid;
}
unsigned int DEMHandler::GetDEMCount() const
unsigned int OssimDEMHandler::GetDEMCount() const
{
assert(ossimElevManager::instance() != NULL);
return ossimElevManager::instance()->getNumberOfElevationDatabases();
}
std::string DEMHandler::GetDEMDirectory(unsigned int idx) const
std::string OssimDEMHandler::GetDEMDirectory(unsigned int idx) const
{
std::string demDir = "";
......@@ -259,17 +259,17 @@ std::string DEMHandler::GetDEMDirectory(unsigned int idx) const
return demDir;
}
std::string DEMHandler::GetGeoidFile() const
std::string OssimDEMHandler::GetGeoidFile() const
{
// Ossim does not allow retrieving the geoid file path
// We therefore must keep it on our side
return m_GeoidFile;
}
void DEMHandler::PrintSelf(std::ostream& os, itk::Indent indent) const
void OssimDEMHandler::PrintSelf(std::ostream& os, itk::Indent indent) const
{
Superclass::PrintSelf(os, indent);
os << indent << "DEMHandler" << std::endl;
os << indent << "OssimDEMHandler" << std::endl;
}
} // namespace otb
......@@ -28,7 +28,6 @@ otbOssimElevManagerTest2.cxx
otbOssimElevManagerTest4.cxx
otbDEMHandlerTest.cxx
otbRPCSolverAdapterTest.cxx
otbSarSensorModelAdapterTest.cxx
)
add_executable(otbOSSIMAdaptersTestDriver ${OTBOSSIMAdaptersTests})
......@@ -466,13 +465,3 @@ otb_add_test(NAME uaTvRPCSolverAdapterValidationTest COMMAND otbOSSIMAdaptersTes
${INPUTDATA}/DEM/egm96.grd
)
otb_add_test(NAME uaTvSarSensorModelAdapter COMMAND otbOSSIMAdaptersTestDriver
otbSarSensorModelAdapterTest
${INPUTDATA}/s1a-iw1-slc-vh-amp_xt.geom
)
otb_add_test(NAME uaTvSarSensorModelAdapter2 COMMAND otbOSSIMAdaptersTestDriver
otbSarSensorModelAdapterTest
${INPUTDATA}/s1a-iw1-slc-vv-20170111_Burst01_amp.geom
)
......@@ -40,8 +40,8 @@ int otbDEMHandlerTest(int argc, char* argv[])
double target = atof(argv[7]);
double tolerance = atof(argv[8]);
otb::DEMHandler::Pointer demHandler = otb::DEMHandler::Instance();
demHandler->SetDefaultHeightAboveEllipsoid(defaultHeight);
auto& demHandler = otb::DEMHandler::GetInstance();
demHandler.SetDefaultHeightAboveEllipsoid(defaultHeight);
bool fail = false;
......@@ -50,21 +50,21 @@ int otbDEMHandlerTest(int argc, char* argv[])
if (demdir != "no")
{
if (!demHandler->IsValidDEMDirectory(demdir.c_str()))
if (!demHandler.IsValidDEMDirectory(demdir.c_str()))
{
std::cerr << "IsValidDEMDirectory(" << demdir << ") = false" << std::endl;
fail = true;
}
demHandler->OpenDEMDirectory(demdir);
std::cout << "GetDEMDirectory() = " << demHandler->GetDEMDirectory() << std::endl;
demHandler.OpenDEMDirectory(demdir);
std::cout << "GetDEMDirectory() = " << demHandler.GetDEMDirectory() << std::endl;
}
if (geoid != "no")
{
try
{
demHandler->OpenGeoidFile(geoid);
demHandler.OpenGeoidFile(geoid);
}
catch (const std::exception& exception)
{
......@@ -73,11 +73,9 @@ int otbDEMHandlerTest(int argc, char* argv[])
fail = true;
}
std::cout << "GetGeoidFile() = " << demHandler->GetGeoidFile() << std::endl;
std::cout << "GetGeoidFile() = " << demHandler.GetGeoidFile() << std::endl;
}
std::cout << "PrintSelf: " << demHandler << std::endl;
otb::DEMHandler::PointType point;
point[0] = longitude;
point[1] = latitude;
......@@ -86,13 +84,13 @@ int otbDEMHandlerTest(int argc, char* argv[])
if (aboveMSL)
{
height = demHandler->GetHeightAboveMSL(point);
height = demHandler.GetHeightAboveMSL(point);
std::cout << "height above MSL (" << longitude << ", " << latitude << ") = " << height << " meters" << std::endl;
}
else
{
height = demHandler->GetHeightAboveEllipsoid(point);
height = demHandler.GetHeightAboveEllipsoid(point);
std::cout << "height above ellipsoid (" << longitude << ", " << latitude << ") = " << height << " meters" << std::endl;
}
......
......@@ -28,5 +28,4 @@ void RegisterTests()
REGISTER_TEST(otbOssimElevManagerTest4);
REGISTER_TEST(otbDEMHandlerTest);
REGISTER_TEST(otbRPCSolverAdapterTest);
REGISTER_TEST(otbSarSensorModelAdapterTest);
}
......@@ -26,6 +26,7 @@
#include "itkEuclideanDistanceMetric.h"
#include "otbSensorModelAdapter.h"
#include "otbRPCSolverAdapter.h"
#include "otbDEMHandler.h"
typedef otb::Image<double> ImageType;
typedef otb::ImageFileReader<ImageType> ReaderType;
......@@ -62,12 +63,12 @@ int otbRPCSolverAdapterTest(int argc, char* argv[])
std::cout << "GeoTol: " << geoTol << " meters" << std::endl;
std::cout << "ImgTol: " << imgTol << " pixels" << std::endl;
otb::DEMHandler::Pointer demHandler = otb::DEMHandler::Instance();
demHandler->SetDefaultHeightAboveEllipsoid(0);
auto& demHandler = otb::DEMHandler::GetInstance();
demHandler.SetDefaultHeightAboveEllipsoid(0);
if (demdir != "no")
demHandler->OpenDEMDirectory(demdir);
demHandler.OpenDEMDirectory(demdir);
if (geoid != "no")
demHandler->OpenGeoidFile(geoid);
demHandler.OpenGeoidFile(geoid);
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName(infname);
......@@ -98,7 +99,7 @@ int otbRPCSolverAdapterTest(int argc, char* argv[])
currentWgs84Point = fwd2dTransform->TransformPoint(currentPoint);
double height = otb::DEMHandler::Instance()->GetHeightAboveEllipsoid(currentWgs84Point);
double height = demHandler.GetHeightAboveEllipsoid(currentWgs84Point);
Point3DType current3DWgs84Point;
current3DWgs84Point[0] = currentWgs84Point[0];
......
......@@ -29,6 +29,7 @@
#include "otbGenericRSTransform.h"
#include "otbOGRDataSourceWrapper.h"
#include "ogrsf_frmts.h"
#include "otbDEMHandler.h"
namespace otb
{
......@@ -142,7 +143,7 @@ private:
{
std::istringstream iss(line);
iss >> x >> y >> lon >> lat;
z = otb::DEMHandler::Instance()->GetHeightAboveEllipsoid(lon, lat);
z = otb::DEMHandler::GetInstance().GetHeightAboveEllipsoid(lon, lat);
otbAppLogDEBUG("Adding tie point x=" << x << ", y=" << y << ", z=" << z << ", lon=" << lon << ", lat=" << lat);
......
......@@ -255,7 +255,7 @@ private:
{
// Clear and reset the DEM Handler
otb::DEMHandler::Instance()->ClearDEMs();
otb::DEMHandler::GetInstance().ClearDEMs();
otb::Wrapper::ElevationParametersHandler::SetupDEMHandlerFromElevationParameters(this, "elev");