Focal

Apply

xrspatial.focal.apply(raster, kernel[, func])

Returns custom function applied array using a user-created window.

Hotspots

xrspatial.focal.hotspots(raster, kernel)

Identify statistically significant hot spots and cold spots in an input raster.

Mean

xrspatial.focal.mean(agg[, passes, ...])

Returns Mean filtered array using a 3x3 window.

Focal Statistics

xrspatial.convolution.convolution_2d(agg, kernel)

Calculates, for all inner cells of an array, the 2D convolution of each cell via Numba.

xrspatial.convolution.annulus_kernel(...)

Generates a annulus (ring-shaped) kernel of a given cellsize and radius.

xrspatial.convolution.calc_cellsize(raster)

Calculates cell size of an array based on its attributes.

xrspatial.convolution.circle_kernel(...)

Generates a circular kernel of a given cellsize and radius.

xrspatial.focal.custom_kernel(kernel)

Validates a custom kernel.

xrspatial.focal.focal_stats(agg, kernel[, ...])

Calculates statistics of the values within a specified focal neighborhood for each pixel in an input raster.