Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
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?
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.
Required, but never shown