Skip to content

Commit

Permalink
[processing/otb]convert ListView in StringList for other applications…
Browse files Browse the repository at this point in the history
… than Radiometric Indices
  • Loading branch information
amondot authored and volaya committed Nov 4, 2015
1 parent 04907d1 commit c548f8d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/plugins/processing/algs/otb/maintenance/OTBHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,10 @@ def get_param_descriptor(appkey, app_instance, our_descriptor, root):
if parameters[app_instance.GetParameterType(our_descriptor)] == "ParameterType_OutputImage" :
attrs = {'source_parameter_type' : 'ParameterType_OutputFilename'}

if parameters[app_instance.GetParameterType(our_descriptor)] == "ParameterType_ListView" :
if not appkey == "RadiometricIndices" :
attrs = {'source_parameter_type' : 'ParameterType_StringList'}

param_type = ET.SubElement(param, 'parameter_type', attrib=attrs)

param_type.text = inverted_parameters[parameters[app_instance.GetParameterType(our_descriptor)]]
Expand All @@ -290,6 +294,9 @@ def get_param_descriptor(appkey, app_instance, our_descriptor, root):
if appkey == "SplitImage" :
if parameters[app_instance.GetParameterType(our_descriptor)] == "ParameterType_OutputImage" :
param_type.text = "OutputFile"
if parameters[app_instance.GetParameterType(our_descriptor)] == "ParameterType_ListView" :
if not appkey == "RadiometricIndices" :
param_type.text = "ParameterString"

# {the_params = get_constructor_parameters_from_filename(file_parameter, mapped_parameter)
if len(the_params) == 0:
Expand Down

0 comments on commit c548f8d

Please sign in to comment.