I have a schematic diagram within QGIS consisting of a single layer of line segments. Lines have been snapped to others using "snap to segment". When using the snap to segment option the two lines that intersect do not share a common vertex.
I am attempting to use Road Graph to navigate the schematic, find paths and distances. The issue is that the shortest path algorithm requires two lines that share a common point.
Is there a plugin, script, or otherwise known procedure to add a common vertex/point on two lines that have been snapped using "snap to segment"?
1 Answer 1
Did not find anything native to solve this issue. Instead I wrote a python script that tested each vertex to see if it was on a line segment of another line.
Used code below to test if a point falls between points of a line segment.
how-can-you-determine-a-point-is-between-two-other-points-on-a-line-segment