apply_process
- eolab.georastertools.cli.utils_cli.apply_process(ctx, tool, inputs: list)[source]
Apply the chosen process to a set of input files.
This function extracts input files from a provided list or direct paths, configures the specified tool, and processes the files through the given tool. Additionally, it handles debug settings (such as storing intermediate VRT files) and manages any exceptions during the process. If an error occurs, the function logs the exception and terminates the process with an appropriate exit code.
- Parameters:
ctx (click.Context) – The context object that contains configuration options.
tool (Filtering or Hillshade or any raster processing tool) – The configured tool instance that will apply the process to the input files. The tool should have been properly set up with parameters.
inputs (list or str) – A list of input file paths or a path to a .lst file containing a list of input file paths. This argument specifies the files that the tool will process.
- Raises:
RastertoolConfigurationException – If there is a configuration error with the tool or its parameters.
Exception – Any other exceptions that occur during the processing of the input files.