1

I want to create a straight line from two vertices of a line which are not straight, but I should be getting a straight line joining the start and end vertices of this curve line.

enter image description here

I want to attain the green line

Gokul Anand
  • 421
  • 4
  • 15

1 Answers1

7

There are several options to do this:

  1. Create a new line-layer, toggle editing, activate snapping and draw a line by snapping to start- and endpoint.

  2. Use this expression with Geometry generator or Geometry by expression (see here how): make_line (start_point ($geometry),end_point ($geometry))

  3. Create a virtual layer with this query:

    select make_line (end_point (l.geometry), start_point (l.geometry))
    from line as l
    
Babel
  • 71,072
  • 14
  • 78
  • 208