Get neighbours list from spatial objects. The output is similar to the function poly2nb of the spdep package with queen = FALSE, but uses sf instead of sp. Two polygons are considered neighbours only when their boundaries share a line segment (an edge), not merely a point.
Arguments
- x
a shape object, i.e., a
sfobject or aSpatialPolygons(DataFrame)(sppackage).