I'm looking for a stable way to create a print composer template which automatically adjust its size to the area of interest (defined by a layer "perimeter" containing one polygon feature) at fixed scale 1:25'000.

I tried using the Atlas tools and set it to fixed scale. This works, but it's not stable and difficult to handle with different projects (different perimeter layers).

It most often does not render the map when Atlas is set to fixed scale in "controlled by Atlas", which means changing to "margin around feature". Further, it always kicks my preset scale and uses "nan", and I haven't found the logic to recreate it.

Any suggestions?

  • Out of curiosity: Why are you using a fixed scale for different AOI? How different are your AOI?
    – Erik
    Commented Feb 28, 2020 at 13:08
  • These are for older QGIS version so you may have to adapt the syntax but the general idea should greatly help you gisunchained.wordpress.com/2014/11/09/…, gisunchained.wordpress.com/2014/11/18/…, qgistutorials.com/en/docs/3/automating_map_creation.html
    – J.R
    Commented Feb 28, 2020 at 16:57
  • @erik What is AOI? We need to deilver maps in 10k or 25k scale and therefore adjust the paper size.
    – Kevkev770
    Commented Feb 28, 2020 at 18:52
  • @erik Area of Interest I got it...every project has one AOI as defined through the perimeter polygon and the maps need to be in 10k and 25k...
    – Kevkev770
    Commented Feb 29, 2020 at 13:10
  • @J.R thx, that's the expression I used to create the composition size.
    – Kevkev770
    Commented Feb 29, 2020 at 13:25

1 Answer 1


You can use a fixed scale for your project just going to Project Proprieties > General and add your scale (1:25000) to the Project Predefinited Scales. Leave this as only scale. Now your Atlas, when you select the option Fixed Scale, your map will use just this scale.

Alternatively, still in Project Proprieties, in Variables, you can create a new variable for the project (click in the green plus in the bottom): call it, e.g., print_scale and give '25000' as data. Now, in the Print Composer, in the Map Item proprieties, where is requested the scale, select the symbol in the right to open the Variables popup > go to Variables... and you should see here the variable print_scale that you have created. Select it. Now your Atlas will use only this fixed scale for all the pages.

  • thx for that. the first option: Is this way possible with two predefinited scales like 10k and 25k? second alternativ: I defined the 25k in the expressions window but it went to "nan"...is this different with variables?
    – Kevkev770
    Commented Feb 29, 2020 at 13:06
  • For the first option: yes, you can add more than one predefined scale. In that case, the map will choose the best scale to show the geometry. Using an Atlas you will see the scale change page to page according to the dimension of the feature of the Coverage Layer. For the second option: weirdly, your result is NaN. Can I ask you how are you writing the scale? As a real number?
    – Val P
    Commented Feb 29, 2020 at 13:47
  • I'll try. second option I tried writing the scale directly into the field, via expression and as variable.
    – Kevkev770
    Commented Feb 29, 2020 at 15:51
  • Reading now some of your comments about the need to print alternating 10 and 25K scale, the first option is the one that will suit your request.
    – Val P
    Commented Feb 29, 2020 at 16:12
  • I now created 3 pages, define map size based on scale and use the preset scales to display the maps. this works 75% perfectly :)
    – Kevkev770
    Commented Mar 1, 2020 at 18:42

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.