Focal Operations#

The focal module contains functions for performing focal and convolution operations on rasters.

Operations#

focal(raster, focal_type, width_or_radius[, ...])

Applies a focal filter to raster bands individually.

correlate(raster, kernel[, mode, cval])

Cross-correlate kernel with each band individually.

convolve(raster, kernel[, mode, cval])

Convolve kernel with each band individually.

Utilities#

check_kernel(kernel)

Validate and return the focal kernel.

get_focal_window(width_or_radius[, height])

Get a rectangle, circle, or annulus focal window.