i'm looking to create an angle attribute inside a layer of points that has a starting coordinate and a finishing coordinate. The angle needs to be 0-360.

Is there a field calculator command that I could use to calculate this?

1 Answer 1


Given the point is at the finishing coordinate and the starting coordinate is constant (in the example set to x0, y0), then use the following formula:

atan2($x - x0, $y - y0) / 0.017453

If the starting coordinate comes from an attribute simply replace x0 and y0 with the appropriate fields.

  • Only got round to doing this today months after asking the question. Worked perfectly! Thanks very much
    – Jamie
    Apr 19, 2016 at 9:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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