Geographic Information Systems Asked by Case Msee on January 24, 2021
I have 3 points in one layer as shown in the first image. I am trying to connect a building points with junction point by 2 lines. For demo, I have manually drawn a lines in image 2. Here, I am trying to achieve two things:
start point
and end point
of connecting lines in seperate table (layer) as shown in image 2 (rightside).Overall, there will be 3 features in points table
and 2 features in line table
.
What I have tried and search?
You can use Menu Processing / Toolbox / Geometry by expression
to create the lines you want:
if (
"Class" = 'building' ,
make_line (
$geometry,
geometry (
get_feature (
'points',
'Class',
'junction'
)
)
),
NULL
)
If you want to have start- and end points as actual geometries/separate layers, you can just use Menu vector / Geometry tools / Extract vertices
and set the lines created before as input.
To visualize start- and endpoint of this line (without creating actual geometries/new layer), add a new symbol layer / Geometry generator / geometry type: point
and add the following expression (see screenshot below).
collect_geometries (
end_point ( $geometry ),
start_point ( $geometry )
)
Answered by babel on January 24, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP