interpolate_akima: Interpolate with package akima

Description Usage Arguments Value Examples

View source: R/interpolate_akima.R

Description

Wrapper function for interp.

Usage

1
interpolate_akima(x, linear = TRUE)

Arguments

x

RasterLayer. Single layer

...

Arguments passed on to akima::interp

linear

logical – indicating wether linear or spline interpolation should be used.

Value

RasterLayer

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
dem <- raster(system.file("external/dtm.grd", package="rdemtools"))
plot(dem)

xy <- xyFromCell(dem, sampleRegular(dem, 10, cells = TRUE)[, 1])
voids <- fake_voids(xy, 100, dem)
plot(voids)

dem[voids] <- NA
plot(dem)

dem <- interpolate_akima(dem)
plot(dem)

GastonMauroDiaz/rdemtools documentation built on Sept. 30, 2018, 8:22 p.m.