Skip to contents

Write DEM to cloud optimized GeoTiff file as specified location

Usage

dem_to_cog(dem, fpath, output_directory = NULL)

Arguments

dem

to write to file

fpath

filepath for output. If no output directory is specified (see below) fpath is parsed to determine the output directory

output_directory

where file should be written. If specified fpath is treated as filename only.

Value

The input DEM. This function is used for the side-effect of writing values to a file.

Examples

if (FALSE) { # interactive()
if (!requireNamespace("CRiSpData", quietly = TRUE)) {
  message("Install CRiSpData from GitHub to run this example.")
} else {
  dem_to_cog(terra::unwrap(CRiSpData::bucharest_dem), "bucharest_dem.tif")
}
}