eogrow.core.area.utm

Area manager implementation for automated UTM CRS grids.

pydantic model eogrow.core.area.utm.PatchSchema[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:
field buffer_x: float = 0

Number of meters by which to increase the tile size to left and right.

field buffer_y: float = 0

Number of meters by which to increase the tile size to up and down.

field size_x: int [Required]

A width of each EOPatch in meters

field size_y: int [Required]

A height of each EOPatch in meters

class eogrow.core.area.utm.UtmZoneAreaManager(config, storage)[source]

Bases: BaseAreaManager

Area manager that splits the area per UTM zone

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

  • offset_x (float)

  • offset_y (float)

  • patch (PatchSchema)

field geometry_filename: str [Required]

Name of the file that defines the AoI geometry, located in the input data folder.

field offset_x: float = 0

An offset of tiling grid in horizontal dimension

field offset_y: float = 0

An offset of tiling grid in vertical dimension

field patch: PatchSchema [Required]
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

eogrow.core.area.utm.create_utm_zone_grid(geometry, name_column, bbox_size, bbox_offset, bbox_buffer)[source]

Creates a grid of bounding boxes covering the given area geometry.

Parameters:
  • geometry (Geometry) –

  • name_column (str) –

  • bbox_size (tuple[int, int]) –

  • bbox_offset (tuple[float, float]) –

  • bbox_buffer (tuple[float, float]) –

Return type:

dict[sentinelhub.constants.CRS, geopandas.geodataframe.GeoDataFrame]