hydroweight | R Documentation |
hydroweight::hydroweight()
generates distance-weighted rasters for targets
on a digital elevation model raster. Examples of targets include single points,
areas such as lakes, or linear features such as streams. The function outputs
a list of length(weighting_scheme)
and an accompanying *.rds
file
of distance-weighted rasters for targets (target_O
is a point/area target as
in iFLO and target_S
is a stream/waterbody target as in iFLS in
Peterson et al. 2011 https://doi:10.1111/j.1365-2427.2010.02507.x).
IMPORTANTLY, this function acts on a single set of targets but can produce
multiple weights. The distance-weighted rasters, can be used for generating
distance-weighted landscape statistics using hydroweight::hydroweight_attributes()
(e.g., % urban
cover weighted by flow distance to a point). See https://github.com/bkielstr/hydroweight for workflows.
hydroweight(
hydroweight_dir = NULL,
target_O = NULL,
target_S = NULL,
target_uid = NULL,
OS_combine = NULL,
clip_region = NULL,
dem = NULL,
flow_accum = NULL,
weighting_scheme = NULL,
inv_function = function(x) { (x * 0.001 + 1)^-1 }
)
hydroweight_dir |
character. File path for read/write. |
target_O |
|
target_S |
|
target_uid |
character. Unique identifier to precede exported list |
OS_combine |
logical. Should target_O and target_S be merged as targets for iEucS, iFLS, and/or HAiFLS? Use |
clip_region |
numeric, |
dem |
character (with extension, e.g., "dem.tif") of file found in |
flow_accum |
character (with extension, e.g., "flow_accum.tif") of file found in |
weighting_scheme |
character. One or more weighting schemes: c("lumped", "iEucO", "iEucS", "iFLO", "iFLS", "HAiFLO", "HAiFLS") |
inv_function |
function. Inverse function used in |
Spatial layers should align (i.e., identical coordinate reference systems - CRS).
Through processing, targets are converted to the resolution and CRS of the
digital elevation model/flow accumulation CRS. TEMP-* files are generated in
hydroweight_dir
depending on processing step and can be overwritten.
For weighting_scheme
:
"lumped" indicates all weights = 1
"iEucO" indicates Euclidean distance to target_O
"iEucS" indicates Euclidean distance to target_S
"iFLO" indicates d8 flow-path distance to target_O
"iFLS" indicates d8 flow-path distance to target_S
"HAiFLO" indicates d8 hydrologically-active (proportional to flow accumulation) flow-path distance to target_O
"HAiFLS" indicates d8 hydrologically-active (proportional to flow accumulation) flow-path distance to target_S
A named list of distance-weighted rasters and accompanying *.rds
in hydroweight_dir
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.