Sometimes we want to put neighboring polygons into one big graph.

extract_graph(geometries, K = 5)

Arguments

geometries

The data.frame containing the polygons and their labels.

K

The number of nearest neighbors to which each polygon will be linked.