Geographic Information Systems Asked by HansrajR on February 9, 2021
How to extend lines to Bounding Box in QGIS as in the following image:
Figure 2: Lines extended to Bounding Box
Link to Shapefile of Bounding Box: https://drive.google.com/drive/folders/1jsJ8m2dG0DNwF1jepxpWzwfUVI5sVJJe?usp=sharing
Link to shapefile of lines: https://drive.google.com/drive/folders/1BQvrMiPillL5ubYsDHfEyoV9st12z0E9?usp=sharing
Use this expression with geometry generator
or the Geometry by expression
tool - the expression is adapted to the data you provided (layer name: 'Bounding Box'
, distance to extend the line: 65
):
intersection (
extend (
$geometry,65,65
),
geometry (
get_feature_by_id(
'Bounding Box',0
)
)
)
Answered by Babel on February 9, 2021
It may not be the most elegant way. However, you use "Extend line" to extend lines by the distance of the longest edge of the polygon.
The output looks like this and you can clip by Polygon with the "Intersection" tool.
Answered by Nil on February 9, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP