diff --git a/Modules/Core/Transform/test/CMakeLists.txt b/Modules/Core/Transform/test/CMakeLists.txt index c6cb763bb696db59b33e17cf069b2b126d5b4bdf..8648d9a694f9260a9347f8c09e3190556d844733 100644 --- a/Modules/Core/Transform/test/CMakeLists.txt +++ b/Modules/Core/Transform/test/CMakeLists.txt @@ -39,8 +39,6 @@ otbSarSensorModelAdapterTest.cxx add_executable(otbTransformTestDriver ${OTBTransformTests}) -message(yo) -message(${OTBTransform-Test_LIBRARIES}) target_link_libraries(otbTransformTestDriver ${OTBTransform-Test_LIBRARIES}) otb_module_target_label(otbTransformTestDriver) diff --git a/Modules/Visualization/MonteverdiCore/src/mvdI18nCoreApplication.cxx b/Modules/Visualization/MonteverdiCore/src/mvdI18nCoreApplication.cxx index 9724701f83850bef376a2066b7b673c293b8e248..eb61da48f94bc07b6e12b3f079f9d78e29e5f375 100644 --- a/Modules/Visualization/MonteverdiCore/src/mvdI18nCoreApplication.cxx +++ b/Modules/Visualization/MonteverdiCore/src/mvdI18nCoreApplication.cxx @@ -348,9 +348,7 @@ void I18nCoreApplication::SetModel(AbstractModel* model) /*******************************************************************************/ bool I18nCoreApplication::ElevationSetup() { - assert(!otb::DEMHandler::Instance().IsNull()); - - otb::DEMHandler::Pointer demHandlerInstance(otb::DEMHandler::Instance()); + auto & demHandlerInstance = otb::DEMHandler::GetInstance(); bool geoidUpdated = false; @@ -363,7 +361,7 @@ bool I18nCoreApplication::ElevationSetup() { QString filename(I18nCoreApplication::RetrieveSettingsKey(I18nCoreApplication::SETTINGS_KEY_GEOID_PATH).toString()); - geoidUpdated = demHandlerInstance->OpenGeoidFile(QFile::encodeName(filename).toStdString()); + geoidUpdated = demHandlerInstance.OpenGeoidFile(QFile::encodeName(filename).toStdString()); // BUGFIX: When geoid file has not been updated by // otb::DEMHandler, the filename may be erroneous and unchecked @@ -397,9 +395,9 @@ bool I18nCoreApplication::ElevationSetup() try { - demHandlerInstance->ClearDEMs(); + demHandlerInstance.ClearDEMs(); - demHandlerInstance->OpenDEMDirectory(QFile::encodeName(I18nCoreApplication::RetrieveSettingsKey(I18nCoreApplication::SETTINGS_KEY_SRTM_DIR).toString()).toStdString()); + demHandlerInstance.OpenDEMDirectory(QFile::encodeName(I18nCoreApplication::RetrieveSettingsKey(I18nCoreApplication::SETTINGS_KEY_SRTM_DIR).toString()).toStdString()); } catch (const std::exception& err) { @@ -413,7 +411,7 @@ bool I18nCoreApplication::ElevationSetup() } else { - otb::DEMHandler::Instance()->ClearDEMs(); + otb::DEMHandler::GetInstance().ClearDEMs(); } return geoidUpdated; diff --git a/Modules/Visualization/MonteverdiCore/src/mvdVectorImageModel.cxx b/Modules/Visualization/MonteverdiCore/src/mvdVectorImageModel.cxx index 7481f1ffb41d55e38b056254b57375dc69c5251a..a2a474e75e5bfa95fc6c8d5fd270e84a42efcc30 100644 --- a/Modules/Visualization/MonteverdiCore/src/mvdVectorImageModel.cxx +++ b/Modules/Visualization/MonteverdiCore/src/mvdVectorImageModel.cxx @@ -603,7 +603,7 @@ void VectorImageModel::virtual_ToWgs84(const PointType& physical, PointType& wgs wgs84 = m_ToWgs84->TransformPoint(physical); - alt = otb::DEMHandler::Instance()->GetHeightAboveEllipsoid(wgs84[0], wgs84[1]); + alt = otb::DEMHandler::GetInstance().GetHeightAboveEllipsoid(wgs84[0], wgs84[1]); } /*****************************************************************************/ @@ -735,7 +735,7 @@ void VectorImageModel::OnPhysicalCursorPositionChanged(const QPoint&, const Poin geoVector.push_back(ossGeographicLong.str()); geoVector.push_back(ossGeographicLat.str()); - double elev = otb::DEMHandler::Instance()->GetHeightAboveEllipsoid(wgs84[0], wgs84[1]); + double elev = otb::DEMHandler::GetInstance().GetHeightAboveEllipsoid(wgs84[0], wgs84[1]); if (elev > -32768) {