jps services
  • Home Page
  • GIS Training Courses
    • QGIS Training Courses
    • ArcGIS Training Courses
    • MapInfo Pro Training Courses >
      • MapBasic Training Course
  • About
  • Blog

Using the Atlas function in QGIS 2.4.0 Chugiak

26/7/2014

0 Comments

 
In the latest version of QGIS the atlas function has been improved so that you can now preview the output rather than having to create a pdf first. If you haven't yet used an atlas facility then you may not be aware of what this option can provide. The atlas facility enables you to use a base map of points, lines or polygons to create a series of maps. You could for instance, take a map of a country consisting of its regions and automatically create a series of maps for each of the regions. 
 
The map of France shown below consists of 22 regions. To show the functionality within the atlas function first choose a print composer or create a new one. I will assume that you are familiar with how to use the print composer. 
Map of French Regions
Map of French Regions
Once you have set up your print composer select Atlas - Atlas Settings from the top menu or alternatively select the tab Atlas generation. Within the Atlas section enable the Generate an atlas option. Select the layer you want as the Coverage layer - in this example the Regions_Metro layer. This layer contains the 22 regional polygons. You have an option to sort the generated maps using an attribute - in this case the regional names. If you enable the map by clicking on it you will see that there is an option: Controlled by atlas in the Item Properties dialogue section. In order for the atlas to be generated you need to enable this option. As this option is not always automatically enabled for the coverage map you need to check that this option is enabled within the Items properties dialogue section. With this feature enabled you have three options: 1. You can choose a margin around the feature. 2. Predefined scale (best fit). 3. Fixed scale. On this occasion I have chosen option 2.   

You can now select Atlas preview from the top menu: Atlas - Preview Atlas. Pan through the maps generated by the atlas function using the arrows option. If you hover your mouse over the arrows you will see that they relate to the First Feature, Previous Feature, Next Feature, Last Feature of the maps generated by the atlas. In this case there are 22 maps in alphabetical order by region. The region attribute was chosen in the Sort By option within the Atlas generation tab.  
Next we can customise the maps with text labels, scale bar and legend. First a text label is added to one of the maps. We can add some text to generate a different label for each map. With the label enabled click on the Insert an expression option. Remove the default text QGIS. Using the options available create the following text: 'This is the ' || "Name_Regio" || ' region.' Click OK and this will transfer the text to the Label Main properties box. You will notice that QGIS has automatically added some extra information at either end of the text: [% ...%]. This results in each map having a unique label.

Next we can put some relevant information within the body of each map. Create a second label and place it in the center of the map within the Print Composer. Use the Insert an expression option to create the following text: 'The region code for ' || "Name_Regio" || ' is ' || "Code_Regio" || '.' || '\n' || 'The population of ' || "Name_Regio" || '\n' || ' is ' || format_number( "Population",0 ). Alternatively, you can enter the text directly in the Label - Main properties section after removing the default QGIS text. If you enter the text directly you will have to manually insert the [% ..%] at the beginning and end of the text. An example of the output from the atlas is shown below.
Atlas text example
Atlas text example
Once you are happy with the preview output you can print, create pdf's of individual maps or of the whole series.  Maps can be saved to a single file, if this is feasible, or to individual files for each map.

If you would like to further explore how GIS could help your organisation jps services offers one and two day training courses in QGIS, ArcGIS and MapInfo. 
0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    Author

    Joe Short BSc has been involved with various mapping solutions for over twenty years.  If you are considering implementing a GIS  or have ArcGIS Pro, MapInfo Pro or QGIS training requirements, jps services would be happy to be of assistance to your organisation. 

    Archives

    April 2020
    March 2020
    October 2019
    September 2019
    August 2019
    July 2019
    March 2019
    November 2018
    October 2018
    August 2018
    July 2018
    November 2017
    October 2017
    September 2017
    July 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    May 2016
    February 2016
    September 2015
    August 2015
    April 2015
    February 2015
    November 2014
    October 2014
    July 2014
    June 2014
    May 2014
    March 2014
    February 2014
    December 2013
    November 2013
    October 2013
    September 2013
    August 2013
    June 2013
    May 2013
    April 2013
    February 2013
    December 2012
    October 2012
    September 2012
    August 2012
    July 2012

    Categories

    All
    Arc Gis
    Arcview
    Autodesk
    Cad
    Gis Training
    Local Government
    Mapbasic
    Mapinfo
    Quantum Gis
    Relational Databases
    Saga Gis

    RSS Feed