Having a curvy road and dividing it into scaled (f.e. 1:1.000 and 1:2.500) and rotated rectangles for atlas function. What is your approach for having the least number of pages, without giving up readability?

I am even not able to manage atlas to refer to the rotation to the single poylgons... :/

example pic


1 Answer 1


I'm not sure I understood your question completely but if I did then you want rotate the Atlas so that it matches each polygon's rotation?

In layout view, go to the map's item properties. Use an expression for the Map rotation field: enter image description here

Set the expression to:

(main_angle( @atlas_geometry )-90)*-1

This will take the main angle of the rectangle, which is the orientation of it's long axis, subtract 90 degrees because you want "up" to match the short axis, and then multiply by -1 to match how the map item specifies rotation for some reason.

If that expression doesn't work then you could calculate a field in the polygon layer to hold the rotation value (called 'rotation' below) and then use an expression like this:


EDIT: To calculate the rotation of each rectangle, we are going to assume that you want "up" to match the short axis or short side of the rectangle. In the layer's attribute table use the Field Calculator to create a new field called "rotation" of type decimal number, and use the following expression: main_angle($geometry)-90

  • @Marek see my edit at the bottom of my answer :) Nov 7, 2022 at 15:39

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.