Skip to content
Snippets Groups Projects
Commit 865b195d authored by Cédric Traizet's avatar Cédric Traizet
Browse files

ENH: use the new DEMHandler in monteverdi

parent 441b3b00
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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;
......
......@@ -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)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment