View source: R/multiscale_connect_matrix.R
| build_multiscale_connectivity_matrix | R Documentation |
Construct a symmetric sparse connectivity matrix linking each finer H3
planning unit to its parent at the next coarser resolution. This is
typically used as the data input to add_multiscale_connectivity_penalties().
build_multiscale_connectivity_matrix(maps, symmetric = TRUE)
maps |
A list as returned by |
symmetric |
Logical; if |
A Matrix::dgCMatrix connectivity matrix of size n_pu × n_pu.
# Minimal 2-resolution parent-child example
h3_child <- "8a2a1072b59ffff"
h3_parent <- "872a1072bffffff"
maps <- build_h3_maps(
s_or_h3 = c(h3_parent, h3_child),
res_vec = c(7L, 8L)
)
conn <- build_multiscale_connectivity_matrix(maps)
conn
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.