7

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.

12

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), '°')

enter image description here

To show the angle while digitizing, enable the advanced digitizing panel, the number next to a is what you are looking for.

enter image description here

Unfortunately, the second one uses a different origin line and rotation direction for the angle.

  • It doesn't use the same origin but you can add +90°for example to the label to make it coincident, no ? – gisnside Dec 6 '17 at 16:21
  • You could, but I guess the compass bearing - on which the question focuses - is the number from the expression function. – Matthias Kuhn Dec 6 '17 at 16:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.