Common contiguities of an sf
POLYGON object
polyg_contiguity.Rd
Wrapper function for sf::st_relate()
. Computes a sparse index
list of contiguities for an sf
POLYGON object.
Arguments
- polygons_input
object of class sf, sfc or sfg with geometry type POLYGON or MULTIPOLYGON.
- contiguity
character; either
"queen"
,"rook"
or"bishop"
. Default is"queen"
.- fill_empty
logical; should empty indices be filled? Default is
FALSE
.
Details
Wrapper for sf::st_relate()
with DE9-IM predicate F***T****
for queen
contiguity, F***1****
for rook contiguity and F***0****
for bishop contiguity.
Setting fill_empty
to TRUE
guarantees at least one index per polygon by adding self-neighboring.