https://github.com/cran/FedData
Revision 781f93f0720f7fb19ac70db9c6073c69b6cb2e2b authored by R. Kyle Bocinsky on 28 November 2022, 07:00:02 UTC, committed by cran-robot on 28 November 2022, 07:00:02 UTC
1 parent 5138a36
Raw File
Tip revision: 781f93f0720f7fb19ac70db9c6073c69b6cb2e2b authored by R. Kyle Bocinsky on 28 November 2022, 07:00:02 UTC
version 3.0.1
Tip revision: 781f93f
get_ned.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/NED_FUNCTIONS.R
\name{get_ned}
\alias{get_ned}
\title{Download and crop the 1 (~30 meter) or 1/3 (~10 meter) arc-second National Elevation Dataset.}
\usage{
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{
\item{template}{A Raster* or Spatial* object to serve
as a template for cropping.}

\item{label}{A character string naming the study area.}

\item{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.}

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

\item{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/'.}

\item{raster.options}{a vector of options for raster::writeRaster.}

\item{force.redo}{If an extraction for this template and label already exists, should a new one be created?}
}
\value{
A \code{RasterLayer} DEM cropped to the extent of the template.
}
\description{
\code{get_ned} returns a \code{RasterLayer} of elevation data cropped to a given
template study area.
}
\examples{
\dontrun{
# Get the NED (USA ONLY)
# Returns a raster
NED <- get_ned(template = FedData::meve, label = "meve")

# Plot with raster::plot
plot(NED)
}
}
back to top