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

ENH: add possibility to set DEM from the configuration file

parent b732831c
No related merge requests found
......@@ -128,10 +128,18 @@ int ConnectedComponentSegmentation::Execute(otb::ApplicationOptionsResult* parse
vproj->SetInputOrigin(inputImage->GetOrigin());
vproj->SetInputSpacing(inputImage->GetSpacing());
if( parseResult->IsOptionPresent("DEMDirectory") )
// Configure DEM directory
if(parseResult->IsOptionPresent("DEMDirectory"))
{
vproj->SetDEMDirectory(parseResult->GetParameterString("DEMDirectory"));
}
else
{
if ( otb::ConfigurationFile::GetInstance()->IsValid() )
{
vproj->SetDEMDirectory(otb::ConfigurationFile::GetInstance()->GetDEMDirectory());
}
}
vproj->Update();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment