I have a set of points at which I want to find the minimum spanning tree with PostGIS. I have no lines between them, I only have the starting point from which to start building the tree (the Multilinestring)
I don't know how to start coding this, would it be better to do it with a recursive query? maybe implement the Prim or Kruskal algorithms using the distances between the points?
For now, I have a table with the points (id, geom) and the starting point (
start_point: = getStartPoint (points))
MST: minimum weight spanning tree is a subset of the edges of a connected, edge-weighted undirected graph that connects all the vertices together, without any cycles and with the minimum possible total edge weight.