diff --git a/python/plugins/processing/algs/otb/OTBSpecific_XMLLoading.py b/python/plugins/processing/algs/otb/OTBSpecific_XMLLoading.py index a6b6330b989..08530425ec5 100644 --- a/python/plugins/processing/algs/otb/OTBSpecific_XMLLoading.py +++ b/python/plugins/processing/algs/otb/OTBSpecific_XMLLoading.py @@ -329,6 +329,23 @@ def adaptComputePolylineFeatureFromImage(commands_list): return commands_list2 +def adaptComputeOGRLayersFeaturesStatistics(commands_list): + """ + Remove parameter and user value instead of giving None. + Check geoid file, srtm folder and given elevation and manage arguments. + """ + commands_list2 = commands_list + adaptGeoidSrtm(commands_list2) + for item in commands_list: + if "None" in item: + index = commands_list2.index(item) + argumentToRemove = commands_list2[index - 1] + commands_list2.remove(item) + commands_list2.remove(argumentToRemove) + # commands_list2.append(item) + return commands_list2 + + def ckeckGeoidSrtmSettings(): folder = ProcessingConfig.getSetting(OTBUtils.OTB_SRTM_FOLDER) if folder is None: