1

Similar to this question I would like to create lines on points in a point layer. The attribute table of the points layer includes a column named azimuth which contains the azimuth/direction these points are directed to. Using the following expression in the Geometry by Expression tool, I know I can create a line with length of 20 and angle (azimuth: angle clockwise from north) of 112° degrees:

extend ( make_line( $geometry, project( $geometry, 20, radians(112) ) ), 20, 0 ) 

How can I use the azimuth values (of type Integer64) stored in the azimuth column to set the angle of the lines independently? I tried to substitute 112 with $azimuth in the example, but without success. Any ideas?

1 Answer 1

1

$azimuth suggests you're accessing a property of the current feature - but $azimuth is not defined.

Also, I don't see why you've added extend() to the whole expression.

make_line($geometry,project($geometry,20,radians(azimuth))) works just fine.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.