Draft: Refac otbObject inheritance
Closes #37 (closed) and #44 (closed)
Changelog :
- output parameter keys and types are stored in object's
out_param_keys
andout_param_types
- add properties
key_input_image
andkey_output_image
to expose the first parameter key corresponding to image parameter IO (replace oldoutput_param
) - thanks to
key_input_image
, it is now possible to pass input file as first argument to an app, even if its name is different than "in" or "il" - add function
export
to export a numpy array, they will be stored in object'sexports_dict
in order to avoid duplicated ExportImage call - it is now possible to pass a
key
parameter toto_numpy
orto_rasterio
in order to export another image than the default output param, array objects will be fetch fromexports_dict
if already exported - add OTBObject function
flush()
in order to separate thewrite
logic (arguments parsing) from theWriteOutput
/ flush event - should help to avoid duplicated executions - add new OTBObject property
outputs
that returns a list of output param values - now that most of the app execution logic has moved to OTBObject, the App class can be extended with functions to improve user experience (like
find_output
) - add function
read_values_at_coords
to RasterInterface that allow to read a pixel value at coordinates, directly or using index likeapp[100,100,1]
- using
_set_param
orset_parameters
with None value or an empty list/tuple now allow to clear a parameter value using app.ClearValue - move App and MetaOTBApp related code to apps.py
Edited by Vincent Delbar