| mc_accum | R Documentation |
Computes the anisotropic accumulated cost of movement around the input
origin location(s), reusing the graph stored in a
mc_surface object (nothing is recomputed). If more than one
origin is supplied, the returned surface stores, for each cell, the minimum
accumulated cost across origins (as in movecost <= 2.x).
mc_accum(surface, origin, time = "h", breaks = NULL)
surface |
a |
origin |
origin location(s) (sf points, SpatVector, or legacy SpatialPointsDataFrame). |
time |
unit for time-based cost functions: "h" (hours, default) or "m" (minutes). |
breaks |
isoline interval; if NULL (default), one tenth of the range of accumulated values. |
Isolines (contour lines) are derived from the accumulated surface at an
interval set by breaks; if no value is supplied, the interval defaults
to one tenth of the range of the accumulated values.
For cost functions expressing cost as walking time, the accumulated values
are returned in the unit selected via time ("h" hours, default, or
"m" minutes); for the Pandolf, Pandolf-corrected, and Van Leusen functions,
values are expressed in Megawatts; other functions keep their native unit
(see mc_cost_functions).
An object of class movecost_accum, a list with components
accum: accumulated cost surface (SpatRaster), masked to
the DTM (NoData cells, e.g. sea, are NA);
isolines: contour lines (sf lines) with a level
attribute;
origin: the origin location(s) (sf);
breaks, levels, time, funct,
funct.label, cost.unit: metadata used by the plot method.
Plot it at any time, and as many times as desired, with plot() (see
plot.movecost_accum); no computation is re-run.
mc_surface, plot.movecost_accum,
mc_export
dtm <- mc_volc()
start <- mc_volc_loc()
surf <- mc_surface(dtm, funct = "t", move = 8)
acc <- mc_accum(surf, origin = start, breaks = 0.05)
plot(acc) # raster + isolines
plot(acc, type = "contour") # isolines only
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.