This is a brief tutorial for the QGIS Atlas Tool which is a Core plugin in QGIS. The QGIS Atlas Tool has been packaged with QGIS since version 1.9. It is an application that allows the user to export or print multiple maps with the same format.
BEFORE WE START
We will be using a layer from a QGIS project to configure the QGIS Atlas Tool. I have chosen to use a layer called “GRID” in following example. Make sure that the layer you choose has a field with unique names that can be used to specify what is exported. The layer you choose need not be a grid you could create a series of images using any vector layer.
In this example the GRID layer has a field called “TILE” containing the names for the map exports.
CREATE A LAYOUT
Create or import a template for the new layout with the print composer. You can also use an existing layout.
For the example shown in figure 1 the following QGIS Atlas Tool settings have been chosen.
- Check the option “Control by Atlas” on
- Turn the “Fixed scale” option on
From the Atlas menu in composer:
- Select Atlas Settings
- Check the option to “Generate an Atlas”
- Under “Configuration” select the coverage layer in this example I’ll choose “Grid”
- Check the option “Single file export when possible”
- Check the option “Sort by”
- Select the field you wish to sort by, my field is called “TILE
The map title can be made to render the name of the feature used for the exported map.
- Select the map label
- Click the “Insert an expression” button
- Type in the text you want to appear before the feature name eg. ‘Atlas Test : ’
- Click the concatenate button “||”
- Expand the “Conditional” function
- Double click “CASE”
- Replace the “condition” text with “$id = $atlasfeatureid”
- Replace the “result” with the “Field name”
Preview the Atlas
- From the Atlas menu select “Preview Atlas”
- Use the “Preview” buttons to view the different maps
The maps can now be exported as a series of images or into a PDF.
- From the “Atlas” menu select “Save as PDF”
- Name and save the new PDF.
Note: The GRID or feature layer does not have to be turned on in the Map View for the Atlas Tool to execute.
The QGIS Atlas Tool was included as a core plugin from version 1.9 of QGIS onwards. It can be used to create a series of map exports based on a grid or feature coverage. The layer used should have a field name that can be used to name and export the individual maps.
The label expression can be used to create a dynamic map title that will update depending on which feature is the focus point.