sample_dem_data: Convenience method for path to sample DEM

View source: R/wbt.R

sample_dem_dataR Documentation

Convenience method for path to sample DEM

Description

Get a file path to DEM.tif stored in extdata subfolder of whitebox package installation directory. If needed, download the TIFF file from GitHub.

Usage

sample_dem_data(
  destfile = file.path(system.file("extdata", package = "whitebox"), "DEM.tif"),
  ...
)

Arguments

destfile

Path to target location of sample data. Will be downloaded if does not exist. Defaults to file path of extdata subfolder of whitebox package installation directory.

...

additional arguments to download.file()

Value

character.

Examples


if (check_whitebox_binary()) {
  wbt_slope(sample_dem_data(), output = "slope.tif")
}
unlink(c('slope.tif', 'settings.json'))

whitebox documentation built on Oct. 29, 2022, 1:10 a.m.