eogrow.pipelines.import_tiff

Implements a pipeline for importing reference data from a raster image.

pydantic model eogrow.pipelines.import_tiff.ResizeSchema[source]

Bases: Schema

How to resize the tiff data after adding it to EOPatches.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

Fields:
field height_param: float [Required]

Parameter to be applied to the height in combination with the resize_type.

field library: ResizeLib = ResizeLib.CV2
field method: ResizeMethod = ResizeMethod.LINEAR
field resize_type: ResizeParam [Required]

Determines type of resizing process and how width_param and height_param are used. See SpatialResizeTask documentation for more info.

field width_param: float [Required]

Parameter to be applied to the width in combination with the resize_type.

class eogrow.pipelines.import_tiff.ImportTiffPipeline(config, raw_config=None)[source]

Bases: Pipeline

Parameters:
  • config (Schema) – A dictionary with configuration parameters

  • raw_config (RawConfig | None) – The configuration parameters pre-validation, for logging purposes only

pydantic model Schema[source]

Bases: Schema

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

Fields:
  • dtype (numpy.dtype | None)

  • input_filename (str)

  • no_data_value (float)

  • output_feature (Tuple[eolearn.core.constants.FeatureType, str])

  • output_folder_key (str)

  • resize (eogrow.pipelines.import_tiff.ResizeSchema | None)

  • tiff_folder_key (str)

field dtype: np.dtype | None = None

Custom dtype for the imported feature.

Validated by:
  • optional_parse_dtype

field input_filename: str [Required]

Name of tiff file to import.

field no_data_value: float = nan

Value assigned to undefined pixels, e.g. outside of given input image.

field output_feature: Feature [Required]

Feature containing the imported tiff information.

field output_folder_key: str [Required]

The storage manager key of the output folder.

Validated by:
  • validate_storage_key

field resize: ResizeSchema | None = None

Settings for SpatialResizeTask applied at the end. When omitted resizing is not performed.

field tiff_folder_key: str = 'input_data'

The storage manager key of the folder containing the tiff. Defaults to the input-data folder.

Validated by:
  • validate_storage_key

config: Schema
filter_patch_list(patch_list)[source]

EOPatches are filtered according to existence of new features.

Parameters:

patch_list (List[Tuple[str, BBox]]) –

Return type:

List[Tuple[str, BBox]]

build_workflow()[source]
Return type:

EOWorkflow