# \donttest{
# Make a small polygon
polygon_py_sm <- sf::st_polygon(
list(cbind(long = c(156, 156, 155, 156),
lat = c(-60, -59, -60, -60)))
)
polygon_py_sm <- sf::st_geometry(polygon_py_sm)
sf::st_crs(polygon_py_sm) <- "epsg:4326"
# Create temporary file
temp_path <- tempfile()
# elevation will be saved in the output_dir (i.e. output directory)
elev(output_dir = temp_path, location = polygon_py_sm)
# Reset user options
unlink(file.path(temp_path))
# }
Run the code above in your browser using DataLab