Introduction to GIS Applications

GIS and QGIS

Layout in QGIS

All final output is created purposely for inclusion in either a report, a thesis, a website or maybe as an image in a presentation. In all of these cases, the given space for this publication is limited. Before creating the final layout (the map), it is important to know the exact dimensions of the output. All the visualized elements in the map (lines, text, areas, points, colours, patterns, ...) have to be such that in the final presentation these elements are readable. Rule of thumb mostly is: "If an element cannot be distinguished (one cannot read it), you do not have to include it in the map."
The series of videos in this section demonstrate the basic workflow of adding the map to a layout, include elements as a title, a map-scale indication, a legend, location information as grid, graticule or location map.
Finally some output formats are shown.

Create a Layout and add maps.

A map has to be created on the dimensions of the final use, if this is not done the final map either needs to be enlarged or reduduced in size. This will have influence on the font-size, used symbols, incorrect display of map-scale and maybe on readability if the map has to be downsized too far.
For the map-face to be created in this demo, the scale is set to 1 : 50.000. The complete map (containing two map views, a location diagram, title, legend, scale and an image) needs to fit on an A4 page (210mm x 297mm).
First step in the process is the creation of a Layout, in QGIS it is possible to have multiple layouts for the same dataset. After having created the layout all elements will be added and edited. At start it is advised to have a sketch on the distribution of the elements on the final result.

The layout(s) are created in a separate window, first step in the process is defining a layout in the "Layout manager". Open the "Layout manager" in the "Project" menu. Click [Create...] an "Empty layout", in the "Create Print Layout" window, enter a name for this layout, "Demo" and accept by clicking [OK]. The "Demo" layout window appears. Right-mouse-click in the main window and select the option "Page Properties...", to set the correct output size and orientation. Choose as size "A4" and orientation "Landscape"
This output will contain two maps, one showing the elevation and a second showing the population. Two different mapviews need to be identified in the "Layers" panel of the project. Return to the project, in the "Layers" panel, de-select the "Neighbourhoods" layer. Click the "Manage Map Themes" button, select the "Add theme..." option, give the new theme the name "elevation" and accept by clicking [OK]. De-select the "Elevation" layer and select the "Neighbourhoods" layer. Follow the same procedure as above, give the new theme the name "neighbourhood". The two maps are prepared, switch to the "Layout".
In the "Demo" layout, click the [Add Map] button, drag a box on the output field. in the "Item Properties" select the option "Position and Size", set "Width" to 100mm and "Height" to 125mm. For the "Scale", enter 50000 as value, as "Layers" check the "Follow map theme" option and select the "elevation" theme. Position the map in the frame using the "Move Item Content" tool.
To add the map with the "Neighbourhood" layer active, select the "Move/Select Item" tool, select the map. Right-mouse-click brings forward a menu, select copy. Click outside the map in the white area and "Right-mouse-click / Paste...". For this second map, select the "Map theme" "neighbourhood". Save the "Demo" layout.

Adding Map Elements.

The map reader requires some basic information to understand what the map is about:

  • a title
  • a legend
  • a scale indication
  • location
The next series of videos will give a quick overview on how to add these elements.
Last video in this series shows how to create final output to a file.

Add a map Title.

A title is the most generalized description of the map. The title informs the map reader about the main theme or purpose of the map.

Activate the "Demo" layout, select the "Add label" tool. Drag the box on the intended location of the title, write the title in the "Main Properties" area of the label: "This is a QGIS Demonstration map". Select the "Font", the "Font style" and "Size". Accept the selection, click [OK]. Set the "Horizontal" alignment, leave other settings to default for now. The two separate maps also require titles, added are "Elevation" and "Population density" as titles. The font size is chosen some smaller than the main map title, the style is changed too.

Add a map Legend.

A legend explains the map content. The meaning of some of the map elements, like the roads and the point symbols, are clear to the map readers and do not necessarily have to be explained. For now the elevation and the population are added as two separate legends.
The two maps are positioned some more to the center of the layout, such that the two legends can be positioned at a balanced location.
Select the "Add Legend" tool and drag a box in the intended location for the "Elevation" map. Different settings are done for this legend. Uncheck the "Auto update" option, the legend content will be fixed in this way. Delete all legend content, except the "elevation" layer. The legend label requires an addition of the measurement scale, double click on the legend label to edit. Change the current title to "Elevation in meter". In "Fonts and Text Formatting" a number of options are available, here the "Subgroup Headings" and "Item Labels" are edited. Avoid selecting too large font sizes. Save work done on regular basis.
Open the "Symbol" option, uncheck "Draw stroke for raster symbols".
Open the "Spacing" options, remove space between the boxes and add some space below the legend heading.
Easiest way to create the legend for the second map "Population density", copy the legend of the "Elevation" and paste it. Select the legend, in the "Legend properties" check and un-check the "Auto update" box. Remove all legend items except the "Neigthbourhoods" layer, change the title to "Neighbourhoods Population density". All styles are inherited from the "Elevation" legend.
Position all elements in a balanced way.

Add a map Scale.

For correct understanding of the map a scale indication is a must. Most effective and best understood is a scale-bar.
One scale-bar will be sufficient, both maps here have the same scale of 1:50,000. Click the "Add Scale Bar" tool, drag a box below the maps. Styling of the scale bar can be done in the "Item Properties". "Main Properties" settings are good for this project. In "Units" the "Number format" requires some editing, press [Customize], uncheck "Show thousands separator". In "Segments" "leave the "left" to 0 and set the number of segments on the "Right" to 5. Set "Fixed width" to 1000 units and "Height" to 1mm. Avoid making the scale-bar too dominant, keep it small. In the "Display" option, set the "Label margin" to 1mm, change in [Font] the "Font" to Arial and set the size to 7 point.
Position the legend centered below the two maps.

Add a Location map.

Not all map readers may know the location of the study area, therefore a location-indicator, a map should be added showing the location in a broader view.
For a location diagram, more map data has to be added to the main map first. A world-data-set is used for this, the location diagram is a small scale map. Apply a style to the added layers, choose line-weight and color. In the next few minutes, watch the various settings done to get a good location map.
In QGIS it is possible to select the features by using a query. Select the "Rule-based" selection method from the pull-down menu, double-click the element displayed and Label the selection. Open the "Expression builder" window to build the query. Select the required attitbute field (double-click) and the correct value or values. These can be added to the "expression" by a double-click. Accept the expression by [ok]. Shown here is a very basic Expression, in a later stage these selection queries may become more complex.
Next step is to appply the correct style to the selected features.
More rules can be added, click the [+] button and repeat the process
Create a map theme "location" of the layers that are required for the basemap of the location diagram, make sure that you have only the layers or the location map checked.
Switch to the "Demo" layout, add a new map at the top of the area. In the "Item Properties" choose the "location" theme as map-theme. Set the map scale to 1:6,000,000.
Use the "Move Item Content" tool to position the map in a correct way in the map-area.
Change the "Backround" color to the same blue as used for the lake infill, this will give the color to the North Sea.
Check the "Frame" option, set the width to 0.1 mm.
The location of the study area is placed by creating an "Overview", click the [+] to add an overview, activate the "Overview 1" by a single click. Check the option "Draw Overview 1 overview" and select as "Map frame" "Map 1" or "Map 2". This will show the location in the map. The default settings of the location indicator have to be edited to make it more clear. Click on the colorbox of "Frame Style", click on "Simple Fill" and change the "Fill color", change the "Stroke color", change the "Stroke width" and set the "Stroke style" to "Solid Line". Check how your choices effect the display of the location area in the map, edit further if the diagram needs to get clearer.
Country names will help the map reader to even get a better understanding of the location. Add the Country names of the Netherlands, Belgium and Germany by using the "Add Label" tool. Fonts style, font color and font size can be set in the "Item Properties".
Save your work with regular intervals.

Create output.

Finally the map is ready and can be exported in either jpeg, svg or pdf format.

In the "Layout" tab of the "Items" in the section "Export Settings" some defaults can be set. These settings can be changed in the final output window, when selecting a certain output file. "Output resolution" is set to the requested resolution by the publisher or output device. "Print as raster" converts all to one flat raster file, a "World" file can be added, when the map has to be placed into another project.
In the top menu, four main output options are available. Output to a printer is a clear option, this will not be further explained. "Export as image" brings forward the "Save Layout As" window, select here the output location, give the "File name" and in "Save as type" select the required output format. A series of raster file formats are available, the choice depends on the requirements. After accepting the settings, "Export Options" are available, here file format specific setting can be made. Accept all settings by pushing the [Save] button, the file is created.
Next option is export as "SVG" file, this is a "Scalable Vector Graphics", this format can be embedded as a vector file in a web environment.
Last option is export as "PDF", a format that is accepted by printing devices, publishers and can be distributed as stand-alone file.
After having created the different outputs, check on quality by opening them in the aproppriate applications.