Runs weighted tessellation across a sequence of time-specific point datasets and returns a stack of allocation rasters, with optional polygons and summaries per time step.
Usage
weighted_voronoi_time(
points_list,
weight_col,
boundary_sf,
time_index = NULL,
distance = c("euclidean", "geodesic"),
geodesic_engine = c("multisource", "classic"),
res = 20,
resistance_list = NULL,
dem_list = NULL,
keep_polygons = FALSE,
keep_summaries = TRUE,
prepared = NULL,
verbose = TRUE,
...
)Arguments
- points_list
A non-empty list of
sfPOINT objects, one per time step.- weight_col
Character. Name of the weight column present in each element of
points_list.- boundary_sf
An
sfPOLYGON/MULTIPOLYGON defining the domain.- time_index
Optional character vector of time labels. Defaults to
names(points_list)if present, otherwise"t1","t2", etc.- distance
Character. One of
"euclidean"or"geodesic".- geodesic_engine
Character. Geodesic engine to use when
distance = "geodesic".- res
Numeric. Raster resolution in CRS units (e.g. metres).
- resistance_list
Optional list of resistance rasters, either length 1 (reused for all times) or the same length as
points_list.- dem_list
Optional list of DEM rasters, either length 1 (reused for all times) or the same length as
points_list.- keep_polygons
Logical. If
TRUE, return polygons for each time step.- keep_summaries
Logical. If
TRUE, return summaries for each time step.- prepared
Optional prepared geodesic context created by
prepare_geodesic_context()for repeated compatible geodesic runs.- verbose
Logical. If
TRUE, prints progress.- ...
Additional arguments passed to
weighted_voronoi_domain().
Value
A list containing:
- allocations
A
terra::SpatRasterwith one allocation layer per time step.- time_index
Character vector of time labels.
- change_map_first_last
A
terra::SpatRasterindicating whether allocation changed between the first and last time step (1= changed,0= unchanged).- persistence
A
terra::SpatRasterindicating whether each cell retained the same allocation across all time steps (1= persistent,0= changed at least once).- polygons
Optional list of
sfpolygon outputs by time.- summaries
Optional list of summary tables by time.