4

It is possible set the first page of a QGIS Atlas different to the other pages? For example I want to create an Atlas document where the first page has a text introduction and a general map (not controlled by Atlas), then from the second page and onwards I want detailed maps but in this case controlled by Atlas.

I have tried to do that setting two pages at the "Composition" tab where in the first page is the introduction and in the second page the map controlled by Atlas, but when I create the pdf document Atlas repeats the first page (page #1) every one page. It is possible to "lock" or "fix" the first page to prevent it from repeating in the rest of the document?

1
  • You could create a separate print composer for the first page, and combine them in Adobe.
    – csk
    Commented Dec 20, 2016 at 18:04

2 Answers 2

6

You can add as many pages as you wish to your atlas and design each accordingly to your need. If you want to have a first page with the title and a second page with an overview map (not controlled by atlas) and starting from page 3 your atlas, just add a first page with text only and a second page with a new map element. Here, just don't activate the "controlled by atlas" checkbox. Than add a third page with a new map, this time check "controlled by atlas".

If you export your atlas, however, the first two pages will be exported for each atlas item separately - if you have 70 features in the covering layer for your atlas, page 1 to 3 will be output each 70 times, thus 210 pages. That is not what you want: you want page 1 and 2 just once, page 3 instead should generate the 70 atlas pages, thus in total 72 pages. To achieve this, do the following for page 1 and 2: open page item properties panel (right-click on your page) and check "Exclude page from exports". Thus, your pages 1 and 2 won't be exported at all. You have to define a condition in such a way that those pages are exported just once - for expample for the first atlas feature, but not for all subsequent features (2 to 70). In the data driven override insert the expression @atlas_featurenumber <>1 that does exactely this: the variable @atlas_featurenumber refers to the respective atlas feature that is output, thus: if the feature is not (unequal: <>) 1 (thus it is 2, 3, 4, ... 69 or 70), the page is excluded from export. In all other cases (thus: if the atlas feature is equal to 1, thus for the first iteration only), the page is exported.

In a similar way you can define page numbers: add a text field and insert the variable @layout_page as page number. Probably, the title page (no. 1) should not get a page-no, pagination should start on page 2 with your overview-map (no. 2). Thus just insert the expression [% @layout_page -1%] to have page 2 numbered as page 1. Starting with page 3, you have to slightly modify this as now the page number should increase with each atlas-page you output, but starting not with one, but with 2 for the first atlas page (because page 1 is the static page with your overview map). Thus the expression to achieve this is: [% @atlas_featurenumber +1%]

Like this, you could add many more static pages and define each page in a different way. However, my experience shows that the print layout will get very slow with a few pages and many tweakings as described above. So in each case evaluate if it would be better to design title-pages, table of contents etc. separately, manybe even in a stand alone software where you have more control over text-layout. But technically, QGIS print layout is extremely powerful and with a little bit of work, you can achieve (almost) everything.

See documentation here: https://docs.qgis.org/3.10/en/docs/user_manual/print_composer/create_output.html#generate-an-atlas

1
  • It works like a charm! Commented Jul 5, 2021 at 15:19
1

This is a bit old. But for people looking for the answer, this is now handled by a report rather than a map composition.

See: https://docs.qgis.org/3.10/en/docs/user_manual/print_composer/create_reports.html

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.