Skip to contents

get_nlcd_annual returns a SpatRaster of NLCD data cropped to a given template study area. The Annual NLCD is currently only available for the conterminous United States. More information about the Annual NLCD product is available on the Annual NLCD web page.

Usage

get_nlcd_annual(
  template,
  label,
  year = 2023,
  product = "LndCov",
  region = "CU",
  collection = 1,
  version = 0,
  extraction.dir = file.path(tempdir(), "FedData", "extractions", "nlcd_annual", label),
  raster.options = c("COMPRESS=DEFLATE", "ZLEVEL=9"),
  force.redo = FALSE
)

Arguments

template

An Simple Feature or terra object to serve as a template for cropping.

label

A character string naming the study area.

year

An integer vector representing the year of desired NLCD product. Acceptable values are currently 1985 through 2023 (defaults to 2023).

product

A character vector representing type of the NLCD product. Defaults to 'LndCov' (Land Cover).
LndCov = Land Cover
LndChg = Land Cover Change
LndCnf = Land Cover Confidence
FctImp = Fractional Impervious Surface
ImpDsc = Impervious Descriptor
SpcChg = Spectral Change Day of Year

region

A character string representing the region to be extracted Acceptable values are 'CU' (Conterminous US, the default), 'AK' (Alaska), and 'HI' (Hawaii). Currently, only 'CU' is available.

collection

An integer representing the collection number. Currently, only '1' is available.

version

An integer representing the version number. Currently, only '0' is available.

extraction.dir

A character string indicating where the extracted and cropped NLCD data should be put. The directory will be created if missing.

raster.options

a vector of GDAL options passed to terra::writeRaster.

force.redo

If an extraction for this template and label already exists, should a new one be created?

Value

A RasterLayer cropped to the bounding box of the template.

Examples

if (FALSE) { # \dontrun{
# Extract data for the Mesa Verde National Park:

# Get the NLCD (USA ONLY)
# Returns a raster
NLCD_ANNUAL <-
  get_nlcd_annual(
    template = FedData::meve,
    label = "meve",
    year = seq(1990, 2020, 10),
    product =
      c(
        "LndCov",
        "LndChg",
        "LndCnf",
        "FctImp",
        "ImpDsc",
        "SpcChg"
      )
  )
} # }