View source: R/surface_metrics.R
elev_deriv | R Documentation |
Provide SpatRasters
of elevation derivatives.
Elev_deriv operates in one of three modes, depending on the input arguments:
As a wrapper for the Fortran makegrids executable, with an existing makegrids input_file.
As a wrapper for makegrids, but with the makegrids input file constructed by elev_deriv.test
To read existing raster files from disk.
In modes 1 and 2, elev_deriv calls makegrids which creates the requested
rasters and writes them to disk as floating point binary files. These are
then read and returned by elev_deriv as a SpatRaster
object.
In mode 3, existing raster files are read directly from disk and returned
as a SpatRaster
object.
elev_deriv(
input_file = "nofile",
rasters = vector("list", 0),
dem = "none",
length_scale = 0,
scratch_dir = "none"
)
input_file: |
Character string; a makegrids input file (optional). If no input file is specified and no other arguments are present, a Windows Explorer window opens for file selection. |
rasters: |
A character vector. Each element contains two strings separated by a comma. The first specifies the type of derivative, the second specifies the file name. These may be either input files to read or output files to write. Available elevation derivatives are:
|
length_scale: |
A numeric (dbl) value specifying the diameter in meters over which to measure the requested derivatives. Used for construction of a makegrids input file. |
dem: |
The file name (full path) of the dem (elevation raster) for construction of a makegrids input file. |
scratch_dir: |
A scratch directory where temporary files are written. If a makegrids input file is created, it is written here. |
SpatRaster
(see terra),
one layer for each requested elevation derivative.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.