In QGIS I would need a Geometry Generator expression to, from a polygons layer, draws a line from the centroid of each polygon to the centroid of each adjacent polygon
1 Answer
Use this expression:
collect_geometries(
array_foreach(
overlay_intersects (@layer, centroid ($geometry)),
make_line (centroid($geometry), @element)
)
)