lyr_to_tif: Get Raster Layer from sdmpredictors

Description Usage Arguments Value

View source: R/tools.R

Description

Get Raster Layer from sdmpredictors

Usage

1
2
lyr_to_tif(lyr, tif, crs, dir_sdm_cache, res = 10000, extent_crop = NULL,
  method = "ngb", redo_tif = FALSE, fill_na = TRUE, fill_window = 3)

Arguments

lyr

layer

tif

tif of raster

crs

coordinate reference system

dir_sdm_cache

local cache directory for fast loading if already calculated

res

resolution (default: 10000 m)

extent_crop

extent to crop (default: NULL)

method

method of interpolation with 'raster::projectRaster()' (default: "ngb")

redo_tif

boolean (True or False) whether to refetch layer, ie of other parameters change

fill_na

boolean (True or False) whether to fill in NAs

fill_window

number of neighboring cells to fill in with 'raster::focal()' (default: 3)

Value

raster object after loading from sdmpredictors, projecting and cropping to study area, and writing raster. The function simply loads the existing raster if the tif already exists, unless redo_tif = TRUE, in which case it is recreated with the arguments given.


resilienseas/oatools documentation built on May 26, 2019, 5:43 p.m.