grid_rasters: Split two regional or national rasters into gridded tiles

View source: R/grid_rasters.R

grid_rastersR Documentation

Split two regional or national rasters into gridded tiles

Description

Split two regional or national rasters into gridded tiles

Usage

grid_rasters(
  rasterpath,
  rasterID,
  regionalextent = NA,
  div,
  buffercells = c(0, 0),
  NAvalues,
  writetiles = T,
  tiledir,
  verbosewrite = F
)

Arguments

rasterpath

file paths of input raster files

rasterID

text strings to identify output tiles (e.g. CDL for NASS Cropland Data Layer)

regionalextent

optional, vector of state names to crop national raster to region of interest

div

division factor specifying the number of tiles in x and y dimensions

buffercells

number of cells overlapping between adjacent tiles

NAvalues

No data or background values of input rasters

writetiles

logical, write tiles as directory of .tif files?

tiledir

path to directory where output tiles should be saved

Details

NAvalue parameter is used to identify raster tiles that are all background (e.g. areas of open water). These background tiles are excluded from list of output tiles and tile directory.

Value

A list of raster tiles. Each element of the list is a pair of raster tiles (one tile for each of the two input raster).


land-4-bees/beecoSp documentation built on March 19, 2024, 3:45 p.m.