Draft: Refac otbObject inheritance
Closes #37 (closed) and #44
Changelog :
- output parameter keys and types are stored in object's
out_param_keysandout_param_types - add properties
key_input_imageandkey_output_imageto 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
exportto export a numpy array, they will be stored in object'sexports_dictin order to avoid duplicated ExportImage call - it is now possible to pass a
keyparameter toto_numpyorto_rasterioin order to export another image than the default output param, array objects will be fetch fromexports_dictif already exported - add OTBObject function
flush()in order to separate thewritelogic (arguments parsing) from theWriteOutput/ flush event - should help to avoid duplicated executions - add new OTBObject property
outputsthat 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_coordsto RasterInterface that allow to read a pixel value at coordinates, directly or using index likeapp[100,100,1] - using
_set_paramorset_parameterswith 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 Cresson Remi