get_nass_cdl returns a RasterLayer of NASS Cropland Data Layer cropped to a given template study area.

get_nass_cdl(
  template,
  label,
  year = 2019,
  extraction.dir = paste0(tempdir(), "/FedData/"),
  raster.options = c("COMPRESS=DEFLATE", "ZLEVEL=9", "INTERLEAVE=BAND"),
  force.redo = FALSE,
  progress = TRUE
)

get_nass(template, label, ...)

get_cdl(template, label, ...)

cdl_colors()

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 NASS Cropland Data Layer product. Acceptable values are 2007--the last year.

extraction.dir

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

raster.options

a vector of options for raster::writeRaster.

force.redo

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

progress

Draw a progress bar when downloading?

...

Other parameters passed on to [get_nass_cdl].

Value

A RasterLayer cropped to the bounding box of the template.

Examples

if (FALSE) { # Extract data for the Mesa Verde National Park: # Get the NASS CDL (USA ONLY) # Returns a raster NASS <- get_nass_cdl( template = FedData::meve, label = "meve", year = 2011 ) # Plot with raster::plot plot(NASS) }