DEV: Deviation from mean elevation

DEVR Documentation

Deviation from mean elevation

Description

Provide a SpatRaster giving the deviation from mean elevation (DEV) over a specified radius for each point of a DEM. DEV is defined for the ith DEM grid point as DEVi = (ei - mean(e))/sd(e), where ei is the elevation of the ith point, mean(e) is the mean elevation of all DEM points within the specified radius, and sd(e) is the standard deviation of those elevations.

Usage

DEV(
  input_file = "nofile",
  raster = "nofile",
  dem = "none",
  radius = 0,
  scratch_dir = "none"
)

Arguments

input_file

Character string: a "LocalRelief" input file (optional). If no input file is specified and no other arguments are present, a Windows Explorer window opens for file selection.

raster

Character string: file name (full path) for an existing DEV raster to read from disk (optional).

dem

Character string: The file name (full path) of the dem (elevation raster) for construction of an input file.

radius

double: Radius in meters to calculate DEV.

scratch_dir

Character string: A scratch directory where temporary files are written. If an input file for program partial is created, it is written here.

Details

DEV() operates in one of three modes, depending on the input arguments:

  1. As a wrapper for the Fortran "LocalRelief" executable, with an existing "LocalRelief" input_file.

  2. As a wrapper for program LocalRelief, but with the input file constructed by DEV.

  3. To read existing raster files from disk.

In modes 1 and 2, DEV calls program LocalRelief, which creates the requested rasters and writes them to disk as floating point binary files. These are then read and returned by DEV as a SpatRaster object. In mode 3, existing raster files are read directly from disk and returned as a SpatRaster object.

Value

A SpatRaster of DEV values.


tabrasel/WetlandTools documentation built on Dec. 20, 2024, 8:50 a.m.