diff --git a/Modules/Applications/AppClassification/app/otbPolygonClassStatistics.cxx b/Modules/Applications/AppClassification/app/otbPolygonClassStatistics.cxx index a6167febed174d998276e97b23f8e8994a6f2d40..75867dd16a2cea1fdbe82a1085a5c23364968586 100644 --- a/Modules/Applications/AppClassification/app/otbPolygonClassStatistics.cxx +++ b/Modules/Applications/AppClassification/app/otbPolygonClassStatistics.cxx @@ -22,6 +22,7 @@ #include "otbStatisticsXMLFileWriter.h" #include "otbGeometriesProjectionFilter.h" #include "otbGeometriesSet.h" +#include "otbWrapperElevationParametersHandler.h" namespace otb { @@ -104,7 +105,9 @@ private: SetParameterDescription("layer", "Layer index to read in the input vector file."); MandatoryOff("layer"); SetDefaultParameterInt("layer",0); - + + ElevationParametersHandler::AddElevationParameters(this, "elev"); + AddRAMParameter(); // Doc example parameter settings @@ -125,6 +128,8 @@ private: otb::ogr::DataSource::New(this->GetParameterString("vec")); std::string fieldName = this->GetParameterString("field"); + otb::Wrapper::ElevationParametersHandler::SetupDEMHandlerFromElevationParameters(this,"elev"); + // Reproject geometries FloatVectorImageType::Pointer inputImg = this->GetParameterImage("in"); std::string imageProjectionRef = inputImg->GetProjectionRef(); diff --git a/Modules/Applications/AppClassification/app/otbSampleSelection.cxx b/Modules/Applications/AppClassification/app/otbSampleSelection.cxx index c4472b33800360f56578cfcfc40fe842e61d12d1..260355880f34d7cb5248416bf24588cc2fe9468c 100644 --- a/Modules/Applications/AppClassification/app/otbSampleSelection.cxx +++ b/Modules/Applications/AppClassification/app/otbSampleSelection.cxx @@ -23,6 +23,7 @@ #include "otbRandomSampler.h" #include "otbGeometriesProjectionFilter.h" #include "otbGeometriesSet.h" +#include "otbWrapperElevationParametersHandler.h" namespace otb { @@ -204,6 +205,8 @@ private: MandatoryOff("layer"); SetDefaultParameterInt("layer",0); + ElevationParametersHandler::AddElevationParameters(this, "elev"); + AddRAMParameter(); AddRANDParameter(); @@ -227,6 +230,8 @@ private: m_Periodic->GetFilter()->ClearOutputs(); m_Random->GetFilter()->ClearOutputs(); + otb::Wrapper::ElevationParametersHandler::SetupDEMHandlerFromElevationParameters(this,"elev"); + // Setup ram m_Periodic->GetStreamer()->SetAutomaticAdaptativeStreaming(GetParameterInt("ram")); m_Random->GetStreamer()->SetAutomaticAdaptativeStreaming(GetParameterInt("ram"));