get_ned returns a RasterLayer of elevation data cropped to a given template study area.

get_ned(
  template,
  label,
  res = "1",
  raw.dir = paste0(tempdir(), "/FedData/raw/ned"),
  extraction.dir = paste0(tempdir(), "/FedData/extractions/ned/", label, "/"),
  raster.options = c("COMPRESS=DEFLATE", "ZLEVEL=9"),
  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.

res

A character string representing the desired resolution of the NED. '1' indicates the 1 arc-second NED (the default), while '13' indicates the 1/3 arc-second dataset.

raw.dir

A character string indicating where raw downloaded files should be put. The directory will be created if missing. Defaults to './RAW/NED/'.

extraction.dir

A character string indicating where the extracted and cropped DEM should be put. The directory will be created if missing. Defaults to './EXTRACTIONS/NED/'.

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?

Value

A RasterLayer DEM cropped to the extent of the template.

Examples

if (FALSE) { # Get the NED (USA ONLY) # Returns a raster NED <- get_ned(template = FedData::meve, label = "meve") # Plot with raster::plot plot(NED) }