st_segments function

Split polygons or lines to segments