get_nlcd returns a RasterLayer of NLCD data cropped to a given template study area.

get_nlcd(template, label, year = 2016, dataset = "Land_Cover",
  landmass = "L48", extraction.dir = paste0(tempdir(),
  "/FedData/extractions/nlcd/", label, "/"), force.redo = F)

Arguments

template

A Raster* or Spatial* object to serve as a template for cropping.

label

A character string naming the study area.

year

An integer representing the year of desired NLCD product. Acceptable values are 2016 (default), 2011, 2008 (landcover only), 2006, 2004, and 2001.

dataset

A character string representing type of the NLCD product. Acceptable values are 'Impervious', 'Land_Cover', 'Canopy_Cartographic' (2011 only), 'Canopy_Analytical' (2011 only), and 'Canopy_Analytical_Error' (2011 only),

landmass

A character string representing the landmass to be extracted Acceptable values are 'L48' (lower 48 US states, the default), 'AK' (Alaska), 'HI' (Hawaii), and 'PR' (Puerto Rico).

extraction.dir

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

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

# NOT RUN {
# Extract data for the Mesa Verde National Park:

# Get the NLCD (USA ONLY)
# Returns a raster
NLCD <- get_nlcd(paleocar::mvnp %>%
          sf::st_as_sf(),
          label = "MVNP",
          year = 2011,
          landmass = "L48")

# Plot with raster::plot
plot(NLCD)
# }