Skip to content

Missing some app default params in App._auto_parameters

In theory, this would be the solution for the remaining missing keys like "opt.rpc":

    if self.app.HasAutomaticValue(key) and self.app.IsParameterEnabled(key):
        self._auto_parameters[key] = value

The problem :
IsParameterEnabled(key) does not work as expected.
For example it returns False for used parameters like:

  • ram (not a problem)
  • ref.in in case of ConnectImage (also not a problem since we have this in self._settings )
  • OrthoRectification opt.rpc, outputs.mode, interpolator, interpolator.bco.radius, elev.default
  • ManageNoData mode.buildmask.inv, mode.buildmask.outv
  • And more

I guess this is different when these are passed to App at init ! But in that case we'll also have the value stored in self._settings.

I don't see how we can fix these without having unused parameters in self._auto_parameters.
Right now, in this dict, we may only find :

  • what is a default param (and is used, but we still need to check this with more apps)
  • but also instance of otbApplicationProxy
  • and convertible to str (like ManageNoData mode).
Edited by Vincent Delbar