remove_plane: Removes the Best Fit Polynomial Surface

Description Usage Arguments Value Examples

View source: R/utilities.R

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

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(raster)

# import raster image
data(orforest)

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

# plot
plot(new_rast)

geodiv documentation built on Sept. 5, 2021, 5:26 p.m.