get_ned: Download and crop the 1 (~30 meter) or 1/3 (~10 meter)...

Description Usage Arguments Value Examples

Description

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

Usage

1
2
get_ned(template, label, res = "1", raw.dir = "./RAW/NED",
  extraction.dir = paste0("./EXTRACTIONS/", label, "/NED"), 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/'.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
# Extract data for the Village Ecodynamics Project 'VEPIIN' study area:
# http://village.anth.wsu.edu
vepPolygon <- polygon_from_extent(raster::extent(672800,740000,4102000,4170000), 
     proj4string='+proj=utm +datum=NAD83 +zone=12')

# Get the NED (USA ONLY)
# Returns a raster
NED <- get_ned(template=vepPolygon, label='VEPIIN')

# Plot with raster::plot
plot(NED)

## End(Not run)


Search within the FedData package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.