diff --git a/R/get_elev_raster.R b/R/get_elev_raster.R index 2ae7ca4..f80b8b7 100644 --- a/R/get_elev_raster.R +++ b/R/get_elev_raster.R @@ -19,7 +19,7 @@ #' the prj is optional and will be taken from \code{locations}. This #' argument is required for a \code{data.frame} of locations. #' @param src A character indicating which API to use. Currently supports "aws" -#' and "gl3", "gl1", "alos", or "srtm15plus" from the OpenTopography API global +#' and "gl3", "gl1", "gl1e", "alos", or "srtm15plus" from the OpenTopography API global #' datasets. "aws" is the default. #' @param expand A numeric value of a distance, in map units, used to expand the #' bounding box that is used to fetch the terrain tiles. This can @@ -86,7 +86,7 @@ #' } get_elev_raster <- function(locations, z, prj = NULL, - src = c("aws", "gl3", "gl1", "alos", "srtm15plus"), + src = c("aws", "gl3", "gl1", "gl1e", "alos", "srtm15plus"), expand = NULL, clip = c("tile", "bbox", "locations"), verbose = TRUE, neg_to_na = FALSE, override_size_check = FALSE, tmp_dir = tempdir(), ...){ @@ -129,9 +129,9 @@ get_elev_raster <- function(locations, z, prj = NULL, # Pass of locations to APIs to get data as raster if(src == "aws") { + } else if(src %in% c("gl3", "gl1", "gl1e", "alos", "srtm15plus")){ raster_elev <- get_aws_terrain(locations, z, prj = prj, expand = expand, tmp_dir = tmp_dir, ...) - } else if(src %in% c("gl3", "gl1", "alos", "srtm15plus")){ raster_elev <- get_opentopo(locations, src, prj = prj, expand = expand, tmp_dir = tmp_dir, ...) } @@ -387,6 +387,7 @@ get_opentopo <- function(locations, src, prj, expand=NULL, tmp_dir = tempdir(), data_set <- switch(src, gl3 = "SRTMGL3", gl1 = "SRTMGL1", + gl1e = "SRTMGL1_E", alos = "AW3D30", srtm15plus = "SRTM15Plus") diff --git a/R/internal.R b/R/internal.R index 0ec0391..3d82fbf 100644 --- a/R/internal.R +++ b/R/internal.R @@ -211,6 +211,7 @@ estimate_raster_size <- function(locations, prj, src, z = NULL){ aws = 32, gl3 = 32, gl1 = 32, + gl1e = 32, alos = 32, srtm15plus = 32) if(src == "aws"){ @@ -219,6 +220,7 @@ estimate_raster_size <- function(locations, prj, src, z = NULL){ res <- switch(src, gl3 = 0.0008333, gl1 = 0.0002778, + gl1e = 0.0002778, alos = 0.0002778, srtm15plus = 0.004165) }