raster_tools.general.aggregate#

raster_tools.general.aggregate(raster, expand_cells, stype)[source]#

Creates a Raster of aggregated cell values for a new resolution.

The approach is based on ESRI’s aggregate and majority filter functions.

Parameters
  • raster (Raster or path str) – Input Raster object or path string

  • expand_cells (2-tuple, list, array-like) – Tuple, array, or list of the number of cells to expand in y and x directions. The first element corresponds to the y dimension and the second to the x dimension.

  • stype (str) – Summarization type. Valid opition are mean, std, var, max, min, unique prod, median, mode, sum, unique, entropy, asm.

Returns

The resulting raster of aggregated values.

Return type

Raster

References