get_nlcd returns a
RasterLayer of NLCD data cropped to a given
template study area.
pal_nlcd return the NLCD
legend and color palette, as available through the
get_nlcd( template, label, year = 2019, dataset = c("landcover", "impervious", "canopy"), landmass = "L48", extraction.dir = paste0(tempdir(), "/FedData/"), raster.options = c("COMPRESS=DEFLATE", "ZLEVEL=9"), force.redo = F ) nlcd_colors() pal_nlcd()
A sf, Raster* or Spatial* object to serve as a template for cropping.
A character string naming the study area.
An integer representing the year of desired NLCD product. Acceptable values are 2019 (default), 2016, 2011, 2008, 2006, 2004, and 2001.
A character string representing type of the NLCD product. Acceptable values are 'landcover' (default), 'impervious', and 'canopy' (2016 and 2011, L48 only).
A character string representing the landmass to be extracted Acceptable values are 'L48' (lower 48 US states, the default), 'AK' (Alaska, 2011 and 2016 only), 'HI' (Hawaii, 2001 only), and 'PR' (Puerto Rico, 2001 only).
A character string indicating where the extracted and cropped NLCD data should be put. The directory will be created if missing.
a vector of options for raster::writeRaster.
If an extraction for this template and label already exists, should a new one be created?
RasterLayer cropped to the bounding box of the template.
NOTE: Prior to FedData version 188.8.131.5200, the `get_nlcd` function returned data in the web Mercator coordinate reference system available through the [MRLC web mapping services](https://www.mrlc.gov/geoserver/web/), rather than data in the NLCD's native projection (a flavor of North American Albers). Until the MRLC web services return data in the original projection, these data are being served from a Google Cloud bucket of pre-processed cloud-optimized GeoTIFFs. The script used to prepare the GeoTIFFs is available at [https://github.com/bocinsky/feddata-nlcd](https://github.com/bocinsky/feddata-nlcd).