Define neighbour relationships according to Queen criterion for polygon contiguity.

queen_nb(poly, snap = NULL, layers = 1)

Arguments

poly

a sf data frame with polygon geometry

snap

numeric, extra distance accepted between polygon borders for contiguity relation

layers

numeric, number of concentric contiguous layers to include in spot neighbourhood. Only Applied when `nb.method = Q`. Default is 1

Value

weighted neighbour matrix in a listw object from spdep package

Details

Based on poly2nb() function from spdep package. Designed to work specifically with Visium / Visium HD data only. Each Visium spot/bin will have a neighbour link with only the first nearest ring of surrounding spots (Visium, n=6) or bins (Visium HD, n=8)

See also

Other nb_funcs: centroid_nb(), knn_nb(), membrane_nb(), nb_expand(), nb_update(), tri_nb()