eogrow.core.area.custom_grid

Area manager implementation for custom grids.

class eogrow.core.area.custom_grid.CustomGridAreaManager(config, storage)[source]

Bases: BaseAreaManager

Area manager that works with a pre-defined grid of EOPatches

Parameters:
  • config (Schema) – The configuration schema

  • storage (StorageManager) – An instance of StorageManager class

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:
  • grid_filename (str)

  • grid_folder_key (str)

  • name_column (str)

field grid_filename: str [Required]

A Geopackage with a collection of bounding boxes and attributes that define EOPatches. If bounding boxes are in multiple CRS then each Geopackage layer should contain bounding boxes from one CRS.

Constraints:
  • pattern = ^.+..+$

field grid_folder_key: str = 'input_data'

Storage key pointing to the folder with the grid file.

field name_column: str [Required]

Name of the column containing EOPatch names.

config: Schema
get_area_geometry(*, crs=CRS.WGS84)[source]

Provides a dissolved geometry object of the entire AOI

Parameters:

crs (CRS) –

Return type:

Geometry

get_grid_cache_filename()[source]

Provides a filename that is used for caching the grid, including the file extensions (likely .gpkg).

Should ensure that two different grids don’t clash.

Return type:

str