Commit 7a690130 authored by Cédric Traizet's avatar Cédric Traizet
Browse files

REFAC: add warning messages when geoid or dem cannot be opened and don't try...

REFAC: add warning messages when geoid or dem cannot be opened and don't try to use a null dataset to create the shifted dataset when the geoid cannot be opened
parent c006724e
Pipeline #9470 passed with stages
in 83 minutes and 24 seconds
......@@ -226,6 +226,7 @@ void DEMHandler::OpenDEMDirectory(const std::string& DEMDirectory)
if (m_DatasetList.empty())
{
m_Dataset = nullptr;
otbLogMacro(Warning, << "No DEM found in "<< DEMDirectory)
}
else
{
......@@ -264,11 +265,15 @@ bool DEMHandler::OpenGeoidFile(const std::string& geoidFile)
}
m_GeoidDS = static_cast<GDALDataset*>(ds);
m_GeoidFilename = geoidFile;
}
if(m_Dataset)
if(m_Dataset)
{
CreateShiftedDataset();
}
}
else
{
CreateShiftedDataset();
otbLogMacro(Warning, << "Cannot open geoid file "<< geoidFile)
}
Notify();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment