In QGIS, I have a polygon layer with square polygons in it. The polyogons are of same size but different orientation. I want to create a set of maps using the atlas feature. My aim is to rotate the map accordingly to the orientation of the polyogns.
The "item properties" offer the possibility to insert an expression for the map rotation. If I had a rotation-field in the property table of the poygons layer I'd be able to automate map rotation accordingly, I suppose. So my question is: is it possible to calculate the rotation of quadratic polyon features relative to the N-S (or W-E) axis?
Here I found a similar question; however, not being familiar with PostGIS, I want to accomplish this in QGIS.