# NOT RUN {
# Generate points and download orthoimagery
mt_elbert_points <- data.frame(
lat = runif(100, min = 39.11144, max = 39.12416),
lng = runif(100, min = -106.4534, max = -106.437)
)
mt_elbert_sf <- sf::st_as_sf(mt_elbert_points, coords = c("lng", "lat"))
sf::st_crs(mt_elbert_sf) <- sf::st_crs(4326)
output_files <- get_tiles(
mt_elbert_sf,
output_prefix = tempfile(),
services = c("ortho")
)
# Merge orthoimagery into a single file
ortho_merged <- merge_rasters(
input_rasters = output_files[1],
output_raster = tempfile(fileext = ".tif")
)
# Convert our points into an overlay
mt_elbert_overlay <- vector_to_overlay(mt_elbert_sf,
ortho_merged[[1]],
size = 15,
color = "red",
na.rm = TRUE
)
# Combine the overlay with our orthoimage
ortho_with_points <- combine_overlays(
ortho_merged[[1]],
mt_elbert_overlay
)
# }
# NOT RUN {
# }
Run the code above in your browser using DataCamp Workspace