| mw_create | R Documentation |
Create a focal ("moving window") weight matrix for use in
terra::focal().
mw_create(r, radius)
r |
SpatRaster. |
radius |
radius of the circle (in units of the crs). |
The returned mask includes raster-cell centres whose Euclidean distance from the focal-cell centre is no greater than 'radius' plus the full raster-cell diagonal. This conservative expansion accounts for the possible displacement of both a disk centre and a contributing point from their respective cell centres.
Martin Haringa
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.