I have several lines that are shown in different colours, do not know which are connected to each other in advance. I want to do path planning only using these lines, i.e., route planning. If I am able to construct a graph using these line segments, I can use graph search techniques, e.g., A*, to find the path between provided two start and target points.
Quation: What could be the optimal way to construct a graph using these line segments? Each such line segment consists of a set of points along the line.
After @Yves Daoust suggestion I got want I want, many tanks