if (FALSE) {
library(elevatr)
library(sf)
data(lake)
lake_buff <- st_buffer(lake, 1000)
loc_df <- data.frame(x = runif(6,min=sf::st_bbox(lake)$xmin,
max=sf::st_bbox(lake)$xmax),
y = runif(6,min=sf::st_bbox(lake)$ymin,
max=sf::st_bbox(lake)$ymax))
x <- get_elev_raster(locations = loc_df, prj = st_crs(lake) , z=10)
x <- get_elev_raster(lake, z = 12)
x <- get_elev_raster(lake, src = "gl3", expand = 5000)
x <- get_elev_raster(lake_buff, z = 10, clip = "locations")
}
Run the code above in your browser using DataLab