Interpolation to a regular grid via triangulation
tri_fun(xy, value, grid = NULL, ...)
xy | coordinates |
---|---|
value | value to interpolate |
grid | grid to use |
... | ignored |
raster
zero_extent <- raster::extent(0, ncol(volcano), 0, nrow(volcano)) r <- raster::setExtent(raster::raster(volcano), zero_extent) xy <- raster::sampleRandom(r, size = 150, xy = TRUE)[, 1:2, drop = FALSE] tri_est <- tri_fun(xy, raster::extract(r, xy)) grd <- raster::raster(raster::extent(xy) ,res = 0.1) tri_est2 <- tri_fun(xy, raster::extract(r, xy), grid = grd)