I have a shapely LineString
and have defined a shapely Point
which lies along the LineString
.
How can I find the vertices of the LineString
which lie either side of the point? (split the line in two)
I have a shapely LineString
and have defined a shapely Point
which lies along the LineString
.
How can I find the vertices of the LineString
which lie either side of the point? (split the line in two)
Locate the line segment in the
LineString
where the point lies. Then split in two groups the vertices of theLineString
accordingly. To locate the line segment, simply apply a point / line segment intersection test to each segment.