View source: R/tesselate_voronoi.R
tesselate_voronoi | R Documentation |
Generates voronoi polygons by first performing stratified sampling across boundary polygons, then by running the voronoisation with st_voronoi().
tesselate_voronoi(
boundaries,
with,
boundary = "sfa",
sample_surface = FALSE,
sample_points = TRUE,
nb_samples = NULL,
min_size = 1500,
stratify = TRUE,
seed = 1
)
boundaries |
[sf] The boundaries to be used. |
with |
[sf] A set of data points to use for voronoisation. |
boundary |
[character] The column in |
sample_surface |
[logical] Whether to sample the surfaces in
|
sample_points |
[logical] Whether to sample points from |
nb_samples |
[named character vector] The number of samples to draw
by boundary polygons (must bear the levels of |
min_size |
[numeric] The minimum size for a polygon above which it will be merged (in km2). |
stratify |
[logical] Whether the discretization happens within the boundaries or whether the whole area is to be used (default to TRUE). |
seed |
[numeric] Passed onto |
A named list with three elements (each an sf
object):
* patches
, the voronoi polygons generated
* points
, the points used for the tessellation.
data(borealis_simulated, package = "sspm")
data(sfa_boundaries, package = "sspm")
tesselate_voronoi(sfa_boundaries, with = borealis, sample_surface = TRUE,
boundary = "sfa", nb_samples = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.