tile_download: Download requested tiles

Description Usage Arguments Value Examples

View source: R/tile_download.R

Description

Download requested tiles

Usage

1
2
3
4
5
6
7
8
tile_download(
  df_req,
  outdir = ".",
  unzip = TRUE,
  check_SHA = FALSE,
  print_iter = TRUE,
  ...
)

Arguments

df_req

a data frame obtained using the ortho_request() and DEM_request() functions

outdir

(optional) name of the output directory; by default, files are saved in the working directory

unzip

TRUE (default) or FALSE, when TRUE the downloaded archive will be extracted and removed; only suitable for certain elevation data

check_SHA

check the integrity of downloaded files (logical, FALSE default)

print_iter

print the current iteration of all (logical, TRUE default)

...

additional argument for utils::download.file()

Value

georeferenced tiles with properties (resolution, year, etc.) as specified in the input data frame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
library(sf)
polygon_path = system.file("datasets/search_area.gpkg", package = "rgugik")
polygon = read_sf(polygon_path)

req_df = ortho_request(polygon)
tile_download(req_df[1, ]) # download the first image only

req_df = DEM_request(polygon)
tile_download(req_df[1, ]) # download the first DEM only

## End(Not run)

rgugik documentation built on May 5, 2021, 1:07 a.m.