I am trying to generate a series of maps suburb-wise for my municipality. All these years I've been doing it manually by panning around the municipality layer and zooming into the suburbs to create individual maps. This year I am giving the Map Atlas feature in QGIS a go. I am extremely impressed with its capabilities. After exploring a bit I realised I am unable to swap between the 'landscape' and 'portrait' mode on the fly. Expectedly some suburbs are better suited to 'portrait' mode whilst others 'landscape'.

I am sure there must be a way to swap between the two. Can anyone point me in the right direction?


You are able to data bind the page size, etc to the current atlas feature like this


Create a field on your features with the values "Landscape" or "Portrait" and you should be all good.

Be aware this doesn't adjust the items in the layout so you will need to bind item properties for this work correctly.

  • Thanks Nathan. This worked well. To 'bind' the layout I created two additional columns i.e. Height and Width and specified the values I was after. – VGu Oct 23 '15 at 2:01

I used a if expression instead of building a virtual column

if(bounds_height( @atlas_geometry ) > bounds_width( @atlas_geometry ) ,'portrait','landscape')

this can be used to configure x and y or height and width of objects

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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