eogrow.tasks.batch_to_eopatch
Tasks used to transform Sentinel Hub Batch results into EOPatches.
- class eogrow.tasks.batch_to_eopatch.LoadUserDataTask(*args, **kwargs)[source]
Bases:
EOTaskTask that loads and adds timestamps and tile names to an EOPatch
- Parameters:
path (str) – A path to folder containing the tiles, relative to the filesystem object.
filesystem (FS) – A filesystem object.
userdata_feature_name (str | None) – A name of a META_INFO feature in which userdata.json content could be stored
userdata_timestamp_reader (str | None) – A reference to a Python function or a Python code that collects timestamps from loaded userdata.json
- class eogrow.tasks.batch_to_eopatch.FixImportedTimeDependentFeatureTask(*args, **kwargs)[source]
Bases:
EOTaskFixes a time-dependent feature that has been imported as a timeless feature from batch results.
It performs the following:
If the timestamps are empty (but not None) and all the data is 0 then it creates an empty eopatch.
rotates bands axis to time axis,
reverses order of timestamps and feature
potentially removes redundant timeframes according to timestamps. This is necessary because in case there were no available acquisitions batch job still had to save a single time frame with dummy values.
Stores initialization parameters and the order to the instance attribute init_args.
- Parameters:
input_feature (Feature) –
output_feature (Feature) –
- class eogrow.tasks.batch_to_eopatch.DeleteFilesTask(*args, **kwargs)[source]
Bases:
EOTaskDelete files
- Parameters:
path (str) – A path to folder containing the files to be deleted, relative to filesystem object.
filesystem (FS) – A filesystem object
filenames (list[str]) – A list of filenames to delete