Video - Making Maps in QGIS with the Print Layout (Part 2)

Catalogue number: Catalogue number: 89200005

Issue number: 2020015

Release date: November 23, 2020

QGIS Demo 15

Making Maps in QGIS with the Print Layout (Part 2) - Video transcript

(The Statistics Canada symbol and Canada wordmark appear on screen with the title: "Making Maps in QGIS with the Print Layout (Part 2)")

So using the Layout Manager, we can reopen our Layout from part one. And now we'll cover adding some additional optional map items. When used judiciously, these items can help enhance the interpretability and aesthetic of a map. One of the final procedures we covered in Part I was locking the Layer and Style of Layers for our Main Map, meaning that changes to the main interface will not impact its appearance in the Print Layout.

So the first item that we'll add is the Inset Map. Back in the main interface we'll toggle the main map group off, toggle the inset on and zoom to the provincially aggregated layer. Now back within the Layout we can add the Inset map, with the Add Map to Layout tool – and left-clicking and dragging across for its placement within the Layout.

We'll then add another scale-bar item - for Map 2 this time. Select Numeric from the Format drop-down. And we'll place it below the Inset map, altering the placement parameter in the display drop-down to Center and adjusting the placement within the Layout. To ensure an intuitive and interpretable scale ratio once again we'll enter a fixed scale value for the Inset Map using the Data Defined Override drop-down, in this case entering 55 million in the Expression window.

Now let's add a picture. So with the tool engaged click and drag where it should be placed within the Layout. Now we can load the image from our Directory by clicking the triple dot icon. It can then be resized and placed within the Layout as needed.

For the final optional item, let's add part of an attribute table to the layout. Click the Attribute Table icon and drag in the layout for its positioning. We can then specify which layer to use, selecting our subset layer – JMBCDPop - in the Layers drop-down. Clicking the Attributes box, we can then specify which fields should be included or removed from the table. So we'll remove the Census Division Unique Identifier, Census Division Type, the provincial fields, as well the Total Private Dwelling counts, percent change and area fields. So we'll rename the remaining fields in the Heading column, which can be of any length. So we'll rename them to Name, Population 2011 and 2016 written in full, Percent Change, Density, Rank (CA) for the national level and Rank (MB) for the provincial level. We can then specify the fields to sort the table by. Here we'll use the CDName field. We could also add additional sorting rules, much like in Excel, here using the provincial population rank.

So now that the table is added we can nudge it down within the layout, and as we resize it within the layout the number of features in the table changes. We could also control this using the parameters in the Feature Filtering drop-down.

In the Appearance section, select Advanced Customization. Check even rows and we'll alter the colour formatting to be a light grey to distinguish the individual rows in the table. In the Show Grid drop-down uncheck the Draw Horizontal Lines box.

Now we'll add a Node Item, using the Add Polyline function, to the Print Layout. We'll use the lines to form the horizontal border lines for the attribute table and header row. So left click twice for the beginning and end of the line, and right-click to complete. We'll then edit the length of the line to ensure that it perfectly matches the width of the attribute table. Then we can sse.. copy and paste the first line and place it in the other two locations. Once this is done we can select the items by clicking and dragging over the Layout, and once again using the Group tool on the Actions toolbar and lock their position in the Items Panel.

With all map items formatted, we can now export the map. So the Map can be exported as an image or as a .pdf. The image file format enables it to be rapidly added within a document as a figure or supporting information, while the .pdf can be used to share the map with others in a widely accessible but protected file format. Here we'll export the map as an image. Navigate to the desired directory and provide an output filename. Then we can enter the desired resolution. In general, 300 dots per inch will suffice for most applications. But say we want to include the map on a poster, then we could use a finer resolution of 600 or even 1200 dots per inch as required. Then click Save, and the export procedure takes about a minute to complete.

When it is completed, click the Hyperlinked Filename at the top of the Layout. And then we can open and examine the output map. If we need to make any adjustments we could easily return to the layout, incorporate them and repeat the export procedure.

So in this demo we explored the principles, procedures and tools for creating a map in the Print Layout. Specifically, users should now have the knowledge and skills to: Distinguish mandatory and optional map items; Use available tools in QGIS's main interface and Print Layout to prepare map data Add map items to the Print Layout and alter their properties using available panels, such as using the lock layers and Style functions in the Item Properties panel to add inset maps, and using the group and lock functions in the Items panel to fix item positions in the Layout.

Finally you should also feel comfortable saving and exporting finalized maps. So apply these skills to your own areas of expertise to create well-balanced, easy-to-interpret maps.

(The words: "For comments or questions about this video, GIS tools or other Statistics Canada products or services, please contact us: statcan.sisagrequestssrsrequetesag.statcan@canada.ca" appear on screen.)

(Canada wordmark appears.)

Date modified: