| mc_boundary | R Documentation |
Delineates, around each origin location, the area reachable within a given
cost limit (for instance, the 30-minute walking catchment), reusing the
graph stored in a mc_surface object. The accumulated cost
surfaces for all origins are obtained with a single multi-source graph
query, so the function scales efficiently with the number of origins
(movecost <= 2.x recomputed the whole conductance matrix for each call).
mc_boundary(surface, origin, limit = NULL, time = "h")
surface |
a |
origin |
origin location(s) (sf points, SpatVector, or legacy SpatialPointsDataFrame). |
limit |
cost limit defining the boundary, in the unit of the cost
function (for time-based functions, in the unit selected via
|
time |
unit for time-based cost functions: "h" (hours, default) or "m" (minutes). |
Unlike movecost <= 2.x, which derived the boundary from contour lines of a
combined minimum-cost surface, version 3.0 polygonises each origin's
reachable area directly (cells with accumulated cost <= limit), which
yields closed polygons by construction and allows area and perimeter to be
computed exactly. Overlapping catchments of different origins are preserved
as separate (overlapping) polygons.
An object of class movecost_boundary, a list with components
boundaries: sf polygons (one feature per origin) with
origin_id, limit, area (m^2) and perimeter
(m) attributes;
accum: the minimum accumulated cost surface across origins
(SpatRaster), useful for plotting;
origin: the origin location(s) (sf);
metadata used by the plot method.
Plot it at any time with plot() (see
plot.movecost_boundary).
mc_surface, plot.movecost_boundary
dtm <- mc_volc()
destin <- mc_destin_loc()
surf <- mc_surface(dtm, funct = "t", move = 8)
# 5-minute walking catchments around three locations
bnd <- mc_boundary(surf, origin = destin[1:3, ], limit = 5, time = "m")
bnd$boundaries # polygons with area and perimeter
plot(bnd)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.