I have drawn a series of straight lines on a map joining different locations. The lines have a single vertex at each end. I am using the Ordnance Survey of Great Britain 1936 projection.
I now want to know the compass bearings I will have to walk to move from one location to the next.
Is there any easy way to get QGIS to calculate/display the azimuth of the lines I have drawn?
Better still is there any way to get QIS to actively display the azimuth of the lines as I am drawing them?
I am aware there is an azimuth function but the syntax appears to need the input of the coordinates of the vertices on either end of the line which would be very time consuming.
Answer
To display the azimuth, use the following expression
degrees(azimuth(start_point($geometry), end_point($geometry)))
To make it more fancy use
CONCAT(format_number(degrees(azimuth(start_point($geometry), end_point($geometry))), 2), '°')
To show the angle while digitizing, enable the advanced digitizing panel, the number next to a is what you are looking for.
Unfortunately, the second one uses a different origin line and rotation direction for the angle.
No comments:
Post a Comment