Skip to content
Snippets Groups Projects
Commit d277ae66 authored by Julien Malik's avatar Julien Malik
Browse files

ENH: add possibility to set DEM from the configuration file

parent 27b1d84b
No related branches found
No related tags found
No related merge requests found
...@@ -143,10 +143,18 @@ int LineSegmentDetection::Execute(otb::ApplicationOptionsResult* parseResult) ...@@ -143,10 +143,18 @@ int LineSegmentDetection::Execute(otb::ApplicationOptionsResult* parseResult)
vproj->SetInputOrigin(reader->GetOutput()->GetOrigin()); vproj->SetInputOrigin(reader->GetOutput()->GetOrigin());
vproj->SetInputSpacing(reader->GetOutput()->GetSpacing()); vproj->SetInputSpacing(reader->GetOutput()->GetSpacing());
if( parseResult->IsOptionPresent("DEMDirectory") ) // Configure DEM directory
if(parseResult->IsOptionPresent("DEMDirectory"))
{ {
vproj->SetDEMDirectory(parseResult->GetParameterString("DEMDirectory")); vproj->SetDEMDirectory(parseResult->GetParameterString("DEMDirectory"));
} }
else
{
if ( otb::ConfigurationFile::GetInstance()->IsValid() )
{
vproj->SetDEMDirectory(otb::ConfigurationFile::GetInstance()->GetDEMDirectory());
}
}
vproj->Update(); vproj->Update();
......
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