Skip main navigation

Creating maps in QGIS

A practical demonstration of how to create maps in QGIS.

Having collected all our data, it’s now time to make some maps!

Lake Hamrin raw data screenshot Having collected all the raw data on the archaeological sites of Lake Hamrin, now we want to make some maps to display it.

The first stage is working out how we want to display our site data.

Symbology for polygons

There are lots of ways in which QGIS can display polygons. The best way to use for a particular map will depend on the data being used, the scale of the map, the nature of the background, and what you are trying to communicate! We are going to set out the main options.

Single symbol

The simplest method of mapping polygons is so they all look the same, this is the default symbology when you add a polygon layer to a project.

  • 1) Right-click your shapefile in the Layers Panel and select “Properties”.
  • 2) Click on the Symbology tab.
  • 3) “Single Symbol” should be visible in the first drop-down box by default, but if not select it.
  • 4) Select a polygon style from the “Favourites” box in the bottom section of the window.
  • 5) Click OK.

Favourite polygon style screenshot Selecting a simple “Favourite” style.

This is a great choice if you need something quick and simple. However, the default favourites are very limited, so we want to have more control over polygon style.

  • 6) Open the Symbology properties of your shapefile again.
  • 7) Click on one of the simple fills in “Favourites”.
  • 8) Then click on “Simple Fill” towards the top of the window.

This opens plenty of options that we can customise to our liking. We can change the fill colour, the stroke (outline) colour and thickness. We can also change the fill style, if we want something other than a normal block of colour, and the stroke style, if we want a dashed or dotted line instead of a solid line.

All these instructions also apply to point and line features, line features just won’t have a “fill” colour.
Changing the style screenshot Customising the polygon style.
It’s easy to get carried away with all the options that are available, generally keeping things simple will produce a clearer map!

Categorized symbology

Often its useful to use symbology to communicate site data from the attribute table. If the information we want to convey is a text field (for example site type or period), then we need categorised symbology.
  • 1) Open the Symbology properties of your shapefile.
  • 2) In the first drop-down list select “Categorized”.
  • 3) For the “Value” field select the field you wish to base your symbology on.
  • 4) Click the “Classify” button towards the bottom of the window.
It is best to only select fields that use between two and ten categories. For example, you would not want to categorise using “site name” as the value would be different for every site.
  • 5) Change the base style by clicking the “Symbol” box.
  • 6) You can now change the style for each category individually, or you can select a colour ramp to change all the styles automatically (like a raster, see Week 4.6).
  • 7) You can also drag and drop the categories to order them differently to the alphabetical default.
  • 8) You can also untick or remove “all other values” (assuming you have collected data for all your sites for your chosen category).
  • 9) Click OK.
Categorised style screenshot Changing polygon category styles.
A categorised symbology can communicate information very effectively.
Example categorised polygons screenshot An example of a useful polygon category symbology.

Graduated symbology

If you want to visualise a numerical field, you need graduated symbology.
  • 1) Open the Symbology properties of your shapefile.
  • 2) In the first drop-down list select “Graduated”.
  • 3) For the “Value” field select the field you wish to base your symbology on.
  • 4) Click the “Classify” button towards the bottom of the window.
Here we have used the site number field as an example. This doesn’t create a very useful map, but it will demonstrate the process. If we had, for example, counted the number of tells for each site, this field would produce a much more interesting map!
  • 5) Change the base symbology and alter the category symbology as for a categorised symbology.
  • 6) You can increase or decrease the number of options by changing the “Classes” number.
If you want to change the statistical method by which these classes are generated, you can also change the “Mode” dropdown option.
Graduated polygons screenshot Graduated polygon symbology.

Centroid fill

Although site location data should be collected as polygons where possible, sometimes it can be difficult to effectively map large numbers of polygons simultaneously. If some sites are much larger than others, or you are mapping a large area, some can end up almost invisible. In this case your polygons can be visualised as points instead.
Any categorised or graduated symbology will not be lost as we are only changing the base symbol.
  • 1) In your Graduated or Categorised symbology click the “Symbol” box.
  • 2) Click “Simple fill” in the window that pops up, or just “Simple fill” if you are using a single symbology.
  • 3) Change “Symbol layer type” to “Centroid Fill”.
  • 4) Click “Marker” to change the size of the point, or “Simple marker” if you want more options.
Centroid fill screenshot A centroid fill is a great way of conveying information for lots of polygons of different sizes – smaller sites are much easier to see as points.

Labels

The next step is adding labels to your sites – a great way of displaying unique data.
  • 1) Right-click your shapefile in the Layers Panel and select the “Labels” tab.
  • 2) Change “No labels” to “Single Labels”.
  • 3) Change “Value” to the field you wish to use for your labels, usually the site name or number.
  • 4) Click OK.
Basic labels screenshot Adding basic labels to your sites.
Very basic labels will be added to the sites on your map.
Default labels screenshot Labels have been added for our sites, but they are difficult to read.
You will probably immediately see things that you would like to change!

Label font

You can change the font style and size in the “Text” labels tab.
Label font screenshot Changing the label font.
You can add a buffer around the text to make it easier to read against the background in the “Buffer” labels tab.
Label buffer screenshot Adding a label buffer.
You can change where the labels are placed in the “Placement” labels tab.
Label placement screenshot Changing the label placement.
There are many other options you can play with, but these three options can help improve your labels greatly!
Improved labels screenshot Adding a buffer and changing the font and placement has greatly improved the labels.
Labels can make a map messy and difficult to read, so use them with care.
Bad labels screenshot Trying to fit all the sites names onto this map is a bad idea – it makes it hard to see the sites!

Selecting the right background

The next step is selecting the right background. This can have a huge impact on how attractive your map is and how easy it is to read. If your sites are a simple set of points, satellite imagery can be used, especially if you want to convey something about the nature of the landscape at the same time.
Satellite background screenshot Satellite imagery can be used as a background to your map.
However, if you are using a more complex symbology for your sites, you may want a plainer background that is less distracting.
DEM background screenshot A DEM might work better if your sites use different colours.
If you do want to use satellite imagery, it can be a good idea to tone it down slightly. An easy way of doing this is to use your semi-transparent hillshade layer over the top of your satellite imagery.
Hillshade over satellite screenshot A semi-transparent hillshade can be used to tone down satellite imagery.
You can also achieve a similar effect by turning all your other raster layers off and then making your satellite imagery semi-transparent.
  • 1) Right-click your image in the Layer Panel and select “Properties”.
  • 2) Select the “Transparency” tab.
  • 3) Drag the transparency slider down to around 50%.
  • 4) Click OK.
Semi-transparent satellite background screenshot Satellite imagery can also be made semi-transparent to give a similar effect.
Now we have our site symbology, our labels and the best possible background, we can finally make a map!

Making a map

Most of the images you have seen in the course so far are not proper maps, but rather simple instructive screenshots or snapshots of satellite imagery. A map designed to be shared more widely, for example in an academic paper or a presentation, should include:
  • A north arrow to show the orientation of the map.
  • A scale bar to show the scale.
  • A legend or key if your sites use different colours or symbols.
Example map This map showing the planned construction of a new road near Stonehenge is a great example of a good map – note the north arrow, scale bar and legend. Courtesy of the Stonehenge Alliance.
It might also include other elements: a title; a grid; or other text and annotations.
We are going to show you how you can add these elements in QGIS.
In QGIS it is possible to save an image of what you can see in your Map Window.
  • 1) On the Main Menu navigate to “Project” > “Import/Export” > “Export Map to Image”
However, if you use this method to make maps it is not possible to add any of the extra necessary elements we have already mentioned. Instead, maps should be constructed as “Print Layouts”.
  • 2) On the Main Menu navigate to “Project” > “New Print Layout”.
  • 3) Give your layout a name, for example “map 1”.
You can have as many layouts as you like within a QGIS project, this is why you need to give it a name!
This will open a new window with new set of tools.
Print Layout window screenshot The Print Layout window.
The window shows a blank sheet of paper – this is where we are going to add our map elements.

Adding map elements

First, we need to add the map itself!
  • 1) Navigate to “Add Item” > “Add Map” on the menu, you can also press the “Add Map” button on the side toolbar.
  • 2) Click and drag to create a rectangle for your map – it should fill most of the page.
Adding a map screenshot Adding a map to your layout.
It’s unlikely that the scale and position of the map is exactly how you want it.
  • 3) Click on the map box and then click the “Adjust map content” button.
  • 4) Click and drag to adjust the position and use the mouse wheel to adjust the scale.
  • 5) Fine tune the scale by clicking the “Item Properties” tab and altering the scale value.
Adjust map screenshot You can adjust the position and scale of the map.
We can then start adding other map elements.
  • 6) Navigate to “Add Item” > “Add North Arrow” on the menu or use the toolbar button.
  • 7) Click and drag to create a north arrow on your map.
  • 8) Click on it and resize and reposition it to get it in the right place.
Adding north arrow screenshot Adding a north arrow.
  • 9) Follow the same process for a scale bar.
  • 10) You can adjust the scale bar’s units and the number of segments in the “Item Properties” tab.
Adding a scale bar screenshot Adding a scale bar.
  • 11) Add a legend to your map using the same process.
By default, all the project’s layers are added to the legend – this is usually more than you want!
  • 12) Click on the legend and select the “Item Properties” tab.
  • 13) Untick “Auto update”.
  • 14) Click on an item you wish to remove and click the red “Remove” button.
  • 15) Repeat until you have just the layers you want in your legend.
Legend customisation screenshot Customising the legend.
  • 16) You can adjust any text in your legend by double clicking it and editing it.
  • 17) You can add a legend title at the top of the “Item Properties” tab.
  • 18) You can add a frame by scrolling down and ticking the “Frame” box.
Legend frame and title screenshot Adding a title and frame to the legend.
Other annotations can be added to your map using the relevant menu command or toolbar button, and adjusted using the “Item Properties” tab.
Other annotations screenshot Other annotations can be added in a similar way.

Exporting maps as images

Once you are happy with your map we can export it!
  • 1) On the menu navigate to “Layout” > “Export as Image”.
  • 2) Save your map somewhere suitable and give the image a name.
  • 3) Set “Export resolution” to 300 dpi.
  • 4) Tick “Crop to Content” and click “Save”.
Export map screenshot Map image export options.
  • 5) On the main QGIS window click the green link that pops up above the Map Window.
QGIS green exported link screenshot Click the green link.
This will open the folder where your map has been saved – double-click it to open your new map!
Final map Our final map has been exported. SRTM data courtesy of the USGS.
Are you pleased with your map? Did you add an extra useful annotations?
This article is from the free online

Advanced Archaeological Remote Sensing: Site Prospection, Landscape Archaeology and Heritage Protection in the Middle East and North Africa

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now