s1tiling.libs.steps._ProducerStep

class s1tiling.libs.steps._ProducerStep(*unused_argv, **kwargs)[source]

Bases: AbstractStep

Root class for all Steps that produce files

New methods & Specialized methods

_clean_cache

Takes care or removing intermediary files once we know they are no longer required like the orthorectified subtiles once the concatenation has been done.

_do_call_hook

Variation point that takes care to execute hooks.

_do_execute

Variation point that takes care of the actual production.

_write_image_metadata

Update Image metadata (with GDAL API).

execute_and_write_output

Actually produce the expected output.

Methods inherited from parent

__init__

Constructor.

release_app

Makes sure that steps with applications are releasing the application (no-op for this class)

Attributes and properties

basename

Basename property will be used to generate all future output filenames.

is_first_step

Tells whether this step is the first of a pipeline.

meta

Step meta data property.

out_filename

Property that returns the name of the file produced by the current step.

pipeline_name

Generate a name for the associated pipeline

shall_store

No OTB related step requires its result to be stored on disk and to break in_memory connection by default.

tmp_filename

Property that returns the name of the file produced by the current step while the OTB application, or the executable, or even the gdal function is running.

_do_call_hook(hook: Callable) None[source]

Variation point that takes care to execute hooks.

abstract _do_execute(parameters, dryrun: bool) None[source]

Variation point that takes care of the actual production.

property basename: str

Basename property will be used to generate all future output filenames.

execute_and_write_output(parameters, execution_parameters: Dict) None[source]

Actually produce the expected output. The how is still a variation point that’ll get decided in _do_execute() specializations.

While the output is produced, a temporary filename will be used as output. On successful execution, the output will be renamed to match its expected final name.

property is_first_step: bool

Tells whether this step is the first of a pipeline.

property meta: Dict

Step meta data property.

property out_filename: str

Property that returns the name of the file produced by the current step.

property pipeline_name

Generate a name for the associated pipeline

release_app() None

Makes sure that steps with applications are releasing the application (no-op for this class)

property shall_store: bool

No OTB related step requires its result to be stored on disk and to break in_memory connection by default.

However, the artificial Step produced by Store factory will force the result of the previous application(s) to be stored on disk.

property tmp_filename: str

Property that returns the name of the file produced by the current step while the OTB application, or the executable, or even the gdal function is running. Eventually, it’ll get renamed into self.out_filename if the application succeeds.