I have shape file with road network (line layer) as shown in Image 1. The road network contains multiple line segments as shown with blue line in image.
- I am trying to generate
end pointof every road segment.
- Save the start and end point in a seperate layer.
Based on the suggested answer here, I am trying to get the start and end points by using query in virtual layer
Problem:It merges start and end points into single colomn. I am trying to get them in seperate coloumns. For instance,
Col 1: start points, Col2: end points
select From_id, st_startpoint(geometry) as geometry from lineshp union select To_id, st_endpoint(geometry) as geometry from lineshp
Attempt with geometry generator:
Problem: It only displays the start and end points. It does not save the data in seperate layer.
union ( end_point ( $geometry ), start_point ( $geometry ) )