I am trying to find explode lines
tool in QGIS equivalent in shapely
or geopandas
(which uses shapely
anyway). does anyone know this?
note that geopandas.GeoDataFrame.explode()
does not work because it converts multilinestring
into linestring
which is not the issue.
Suppose I have a LineString
:
'LINESTRING ((0,0),(0,1),(0,2),(0,3),(0,4))'
How do I explode this into
'LINESTRING ((0,0),(0,1))'
'LINESTRING ((0,1),(0,2))'
'LINESTRING ((0,2),(0,3))'
'LINESTRING ((0,3),(0,4))'
Best Answer
Or