I have a bunch of points which I have extracted from line features. Now I want to connect them back to a line, but unfortunately, they are not sorted in the correct way, so I always end up with a wild mess.
So I thought about an approach where the line creation starts at a defined start point and then connects the points one by one, always chosing the next vertex based on the minimum distance from the previous one. But I have no idea how to do that in QGIS. Aside from the distance to the next point, I have nothing else to determine the line direction.
Any suggestions welcome (incl. Python coding).


