Skip to content
Snippets Groups Projects
Commit e5269c36 authored by Otmane Lahlou's avatar Otmane Lahlou
Browse files

ENH: use the value in the configuration file to initialize the dem directory and the geoid file

parent 2bce7478
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,7 @@ void ElevationParametersHandler::AddElevationParameters(Application::Pointer app
app->AddParameter(ParameterType_Directory, oss.str(), "DEM directory");
app->SetParameterDescription(oss.str(),
"This parameter allows to select a directory containing Digital Elevation Model tiles");
app->MandatoryOff(oss.str());
app->SetParameterString(oss.str(), otb::ConfigurationFile::GetInstance()->GetDEMDirectory());
// Average elevation
oss.str("");
......@@ -61,6 +61,7 @@ void ElevationParametersHandler::AddElevationParameters(Application::Pointer app
oss << ".value";
app->AddParameter(ParameterType_Filename, oss.str(), "Geoid File");
app->SetParameterDescription(oss.str(),"Use a geoid grid to get the height above the ellipsoid used");
app->SetParameterString(oss.str(), otb::ConfigurationFile::GetInstance()->GetGeoidFile());
// Set the default value
app->SetParameterString(key, "dem");
......@@ -106,7 +107,7 @@ ElevationParametersHandler::GetGeoidFile(const Application::Pointer app, const s
*
* Get the Elevation mode choosen by the user
*/
const ElevationType
ElevationType
ElevationParametersHandler::GetElevationType(const Application::Pointer app, const std::string& key)
{
switch(app->GetParameterInt(key))
......
......@@ -52,7 +52,7 @@ public:
* projection picked up by the user
*
*/
static const ElevationType GetElevationType(const Application::Pointer app, const std::string& key);
static ElevationType GetElevationType(const Application::Pointer app, const std::string& key);
/** Method for getting the value of the elevation mode selected */
static const std::string GetDEMDirectory(const Application::Pointer app, const std::string& key);
......
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