Learn R Programming

WES (version 1.0.0)

download_elevation_data: Download DEM from AWS Terrain Tiles

Description

This function takes the coordinates of sampling sites (longitude and latitude) and downloads a Digital Elevation Model (DEM) for the surrounding area. The DEM has an approximate spatial resolution of 100 meters. These data are derived from the Shuttle Radar Topography Mission (SRTM) DEM, which is accessible through the Amazon Web Services (AWS) API and the elevatr R package.

Usage

download_elevation_data(lon, lat, path_output)

Value

Character string giving path to downloaded data.

Arguments

lon

A numeric vector giving the longitude of the sampling sites in Decimal Degrees.Can accept a vector of multiple ISO codes.

lat

A numeric vector giving the latitude of the sampling sites in Decimal Degrees.

path_output

A character string giving the file path of an output directory to save downloaded data.

Examples

Run this code
# \donttest{

download_elevation_data(lon = template_WES_data$lon,
                        lat = template_WES_data$lat,
                        path_output = tempdir())

# }

Run the code above in your browser using DataLab