Skip to contents

Smooth raster with focal median

Usage

filter_median(
  raster = raster,
  window = 3,
  extent = NULL,
  ext = NULL,
  filename = NULL
)

Arguments

raster

a terra SpatRaster to smooth.

window

focal window size, default is 3.

extent

an extent or SpatVector used to subset SpatRaster. Defaults to the entire SpatRaster.

ext

character, a graphic format extension.

filename

NULL (default) to write automatically into products, provide full path and ext to override.

Value

smoothed SpatRaster