remove_plane {geodiv}R Documentation

Removes the Best Fit Polynomial Surface

Description

Finds the best fit polynomial surface for a raster or matrix and subtracts it from the actual values. The output image has positive values where the actual values are higher than the surface and negative values where the actual value are lower than the surface.

Usage

remove_plane(x)

Arguments

x

A raster or matrix.

Value

A raster or matrix of the same size as the input with values equal to the difference between the original and bestfit plane.

Examples

# import raster image
data(orforest)
orforest <- terra::unwrap(orforest)

# remove the least squares polynomial surface
new_rast <- remove_plane(orforest)

# plot
terra::plot(new_rast)

[Package geodiv version 1.1.0 Index]