Commit 5285094a authored by Gaetano Raffaele's avatar Gaetano Raffaele
Browse files

Change Dynamic Convert Parameters

parent fb727361
......@@ -122,8 +122,12 @@ def landscape_stratification_metric(fn, output_file, md=[1, 1], duration=365, cb
pca.SetParameterInt('cbegin', cbegin)
pca.SetParameterInt('cend', cend)
pca.SetParameterFloat('bv', ndv)
pca.SetParameterString('rescale', 'minmax')
pca.SetParameterInt('rescale.minmax.outmin', 0)
pca.SetParameterInt('rescale.minmax.outmax', 2048)
pca.Execute()
"""
dyn = otb.Registry.CreateApplication('DynamicConvert')
dyn.SetParameterInputImage('in', pca.GetParameterOutputImage('out'))
dyn.SetParameterInt('outmin', 1)
......@@ -134,9 +138,10 @@ def landscape_stratification_metric(fn, output_file, md=[1, 1], duration=365, cb
dyn.SetParameterInputImage('mask', msk.GetParameterOutputImage('out'))
dyn.SetParameterOutputImagePixelType('out', otb.ImagePixelType_int16)
dyn.Execute()
"""
fin = otb.Registry.CreateApplication('ManageNoData')
fin.SetParameterInputImage('in', dyn.GetParameterOutputImage('out'))
fin.SetParameterInputImage('in', pca.GetParameterOutputImage('out'))
fin.SetParameterString('mode', 'apply')
fin.SetParameterInputImage('mode.apply.mask', msk.GetParameterOutputImage('out'))
fin.SetParameterString('out', output_file)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment