diff --git a/Code/ApplicationEngine/otbWrapperElevationParametersHandler.cxx b/Code/ApplicationEngine/otbWrapperElevationParametersHandler.cxx index d981d4132978be48c61495915c9461e63d55381e..5c116907b9ee4e40b5d6e77594afc54cd2a5cd76 100644 --- a/Code/ApplicationEngine/otbWrapperElevationParametersHandler.cxx +++ b/Code/ApplicationEngine/otbWrapperElevationParametersHandler.cxx @@ -28,6 +28,7 @@ void ElevationParametersHandler::AddElevationParameters(Application::Pointer app app->AddParameter(ParameterType_Choice, key, "Elevation management"); app->SetParameterDescription(key, "This group of parameters allows to manage elevation values. Supported formats are SRTM, DTED or any geotiff processed by the DEM import application"); + app->MandatoryOff(key); // DEM directory std::ostringstream oss; @@ -143,5 +144,11 @@ ElevationParametersHandler::IsGeoidUsed(const Application::Pointer app, const st return app->IsParameterEnabled(geoidKey.str()) && app->HasValue(geoidKey.str()); } +bool +ElevationParametersHandler::IsElevationEnabled(const Application::Pointer app, const std::string & key) +{ + return app->IsParameterEnabled(key); +} + }// End namespace Wrapper }// End namespace otb diff --git a/Code/ApplicationEngine/otbWrapperElevationParametersHandler.h b/Code/ApplicationEngine/otbWrapperElevationParametersHandler.h index 47ceefd6a3a69ab09698b9645d156a824986d11a..82bdf03ad74a7fdd2cf9a21bfff65b997fe4018f 100644 --- a/Code/ApplicationEngine/otbWrapperElevationParametersHandler.h +++ b/Code/ApplicationEngine/otbWrapperElevationParametersHandler.h @@ -59,6 +59,7 @@ public: static float GetAverageElevation(const Application::Pointer app, const std::string& key); static const std::string GetGeoidFile(const Application::Pointer app, const std::string& key); static bool IsGeoidUsed(const Application::Pointer app, const std::string& key); + static bool IsElevationEnabled(const Application::Pointer app, const std::string & key); protected: ElevationParametersHandler(); // not implemented