If have an input layer with a couple of lines, called Line with an attribute. I would like to have a virtual layer with alle connecting lines dissolved, regardless of the attribute.
input:
expected output as in "dissolve" with keep disjoint features separate
I used the following query:
select ST_LineMerge(geometry) as geometry from Line
But the connected lines are not merged:
Using ST_Union in the following query yields me a single multipart feature:
select st_multi(st_union((geometry))) as geometry from Line
could the Group bysegment with something like Disjoint be an option? Like
select st_multi(st_union((geometry))) as geometry from Line
Group By disjoint




ST_LineMerge(geometry)be correct in this case? – Beni Nov 17 '23 at 15:55st_lineMergerequires a multiline and will try to stitch segments together. So maybe you could create one giant multiline, st_lineMerge it and explode it again (but not in a VL) – JGH Nov 17 '23 at 16:14