getCovariateRasters: Get a SpatRaster of covariates from a folder containing .tif...

View source: R/extract.R

getCovariateRastersR Documentation

Get a SpatRaster of covariates from a folder containing .tif files

Description

Looks in a specified folder for raster files. Returns a multi-layered SpatRaster of the rasters cropped to the extent specified by the shape parameter.

Usage

getCovariateRasters(directory, file_pattern = ".tif$", shape)

Arguments

directory

Filepath to the directory containing the rasters.

file_pattern

Pattern the filenames must match. Default is all files ending in .tif .

shape

An object with an extent that the rasters will be cropped to.

Value

A multi-layered SpatRaster of the raster files in the directory

Examples

## Not run: 
  getCovariateRasters('/home/rasters', '.tif$', shape)
 
## End(Not run)


disaggregation documentation built on Nov. 8, 2023, 5:07 p.m.