Disclaimer:
This tutorial series was designed for ED4 studio students enrolled in the Faculty of Architecture’s Environmental Design (ED) program. Examples, data, and instructions are therefore tailored towards the needs of ED students, especially those who will be enrolled in the Landscape Architecture (Landscape + Urbanism) Program. However, majority of the content below will be useful for beginners in geospatial analysis and digital mapping. The software of choice in this tutorial series is QGIS, an open source and accessible (Windows and Mac compatible) desktop application.

On this page:
  • Learning objectives
  • Section 1: Shapefile (SHP) and friends
  • Section 2: Pictures = Images: import and work with raster images
  • Section 3: All maps are lies: define and transform geospatial data projections and coordinate systems
  • Section 4: Importing base maps into QGIS

Learning objectives

By the end of this module, you should be able to: 

  • Navigate QGIS’s user interface (UI) and locate commonly used tools and functions.
  • Load vector shapefiles, raster images from various sources. 
  • Create and import data into geopackages (gpkg). 
  • Define and transform data projections/coordinate systems.
  • Understand how attribute tables store and structure data in GIS.
  • Load and change base maps online using QGIS. 
  • Understand the difference between “data file”, “layer”, “layout”, and “map document”.

Before you start the exercise below, please make sure you have installed the long-term release (LTR) version of the QGIS. At the time of preparing this document, the LTR is v3.28. 


Download the installation package here. QGIS is an open source software, compatible with both Windows and Mac. 

Requirements

  • A laptop (PC or Mac). If you do not have one, please loan one from CADlab (30 days maximum).  
  • QGIS Long-Term Release version (the current LTR is QGIS 3.28 at the time of preparing this document). Download here.
  • M1 input files

Resources

Legend:
[Action]
! Important notes from the instructor !

Section 1: Shapefile (SHP) and friends

In this section, we will first explore the QGIS user interface (UI) so that you are familiar with the menu options, toolbars, map canvas and layers list that form the basic structure of the interface. 

  • Image of QGIS user interface showing "new empty project" icon.
  • [Double click] the QGIS icon to start the program. [Click New Empty Project]. 
    [Click Project -> Save] to save this project in your local drive. You can name it Day_1_YOURNAME. 

    By default, all new projects will be projected using World Geodetic System 1984 (WGS 84, and its EPSG code is 4326).

    ! However, it does NOT determine the projection of the data you are about to load into this project !

You will be greeted with the interface shown below. 

  1. Layers list 
  2. Toolbars
  3. Map canvas 
  4. Browser (to access local and online data)
  5. Processing toolbox 
  6. Current “on-the-fly” map scale and projection/coordinate system 


If you prefer a dark themed QGIS UI, you can switch to Night Mapping mode: [Settings -> Options -> General -> UI Theme]. You will have to [restart QGIS] to see the change. 

  • Image of QGIS interface when "new project" in opened.

Next, let’s load some data onto the map canvas! 
Please [download the file from the corresponding folder]. [Save the file on your Desktop] (for now). QGIS will not be able to read zipped/compressed files. !Please avoid loading data from a network drive (e.g., OneDrive or Dropbox)! It will cause delays and generally is not a good habit to develop. 
You will need to unzip the file you have just downloaded. 
Windows: [Right click the file -> Extract] 
Mac: [double click the file]
You can now [delete the zipped/compressed file]

  • Screenshot of "refresh" icon in QGIS user interface.
  • Under the Browser panel, locate your desktop folder and find …/Day_1/Data/manitoba-latest-osm (if you cannot find the folder, try [clicking the refresh] icon.

  • Screenshot of expanded data folder in QGIS user interface.
  • You should be able to see these files (gis_osm_*.shp) shown in the screenshot. These files here are downloaded from the Open Street Map (OSM). !OSM is one of the largest open source geospatial data providers in the world!

    The simplest geometry type in GIS is point. Points form lines, and lines form polygons (shapes). These geometries are often referred to as Vectors.
    We will load one file from each category. The OSM data format provided here are shapefile (.shp), and to load them, you can either [double lick the file name] or [drag-and-drop it onto the map canvas] in the middle of the screen.

    Load the following shapefiles of Manitoba:
    • gis_osm_poi_free_1.shp (poi = points of interest)
    • gis_osm_railways_free_1.shp (railway lines)
    • gis_osm_buildings_free_1.shp (building footprints)

To turn on / off each layer, you can [check / uncheck the box] on the left side of the layer name under the Layers pane. You can also change the drawing order simply by dragging the layer up and down under the Layers pane.   


It is not the prettiest map to look at when zooming out (screenshot, left). It gets a bit better when zooming in (screenshot, right). We will worry about the styling (or map symbology in GIS lingo) later. For now we will be sticking with the default symbology settings from QGIS.  

  • Screenshot of GIS data points overlayed on a map of Winnipeg.

You might want to save this QGIS Project before moving to the next step. 
[Cltr + S] (Windows) or [Cmd + S] (Mac) 

In some cases, you might find yourself downloading data in formats other than .shp. Do not worry. QGIS can read most common geospatial data formats, such as json, kml (Google Earth), geodatabase (.gdb, native to ArcGIS, another common software used in the GIS community), geopackage (.gpkg, native to QGIS), and even Excel tables (.csv) with coordinates information. 

  • Screenshot of green GIS data points across southern Manitoba.

In the same folder, you will notice another file, kontur_population_CA_20231101.gpkg. This is a geopackage file containing a congregation of hexagons, each of which contains a population count value. The data is sourced from the Humanitarian Data Exchange (HDX, download here). The data you have is for Canada. 

Section 2: Pictures = Images: Import and work with raster images

Raster (or raster image) is another way to represent geographic data. A raster image typically consists of connected pixels (short for picture elements), each of which contains a value. Almost all satellite images nowadays are stored digitally as rasters (before it was in analogue films). 


Terrain information is also typically stored as rasters with each pixel containing a value representing the elevation (usually in meters). This is known as a digital terrain model (DTM). In the folder, you will find a DTM raster for a part of southern Manitoba: output_COP30.tiff. This raster was sourced from https://portal.opentopography.org/datasets and it is free to use! 

  • Image of two GIS datasets overlayed on a map of southern Manitoba.

My QGIS window now looks like the screenshot above -- What a mess.
Like many Adobe applications that you might be more comfortable with, QGIS also allows you to group layers and give it a meaningful name. 

  • Screenshot of "layer" panel in QGIS user interface.
  • [Ctrl + right click layers you’d like to group -> group selected -> Name the group].

    Now we have some structure and hierarchy in our Layer pane.
    !It is important to note that anything you do under the Layer Pane will NOT affect the actual data! For example, you can even rename those layers and make duplicates of them in QGIS.

    Again, we will make some styling (or map symbology) adjustments later. Next, we will need to do something about these stretched hexagons.

Section 3: All maps are lies: define and transform geospatial data projections and coordinate systems

The best way to represent the Earth is to use a three-dimensional (3D) model. But for practical reasons, most maps are created for two-dimensional (2D) devices (e.g., paper, screens etc.). Inevitabley, when presenting a 3D sphere (like an orange) onto a 2D surface (after you peel the orange), there will be distortions particularly of its shape, size, and direction.

! The process of this 3D-to-2D mathematical transformation is a map projection !

  • Image of orange peel with illustration of continents. Peel is removed to describe the way in which maps are created from round surface of the earth.

!All maps come with distortions! But some are more suitable than others (or more accurately speaking, tolerable) for certain applications and scales. For example, Google Maps uses a Mercator projection which largely distorts the size of many countries, and the farther away you are from the Equator, the more distorted the map becomes! 


Fun fact: Do you know that Africa is 14 times bigger than Greenland? 


And have you noticed that most 2D world maps are always Euro-centric: the Pacific Ocean always splits in half while the Atlantic Ocean and the European continent are centred and in one piece? Indeed, maps are also political, but this is a topic for another day! 


QGIS allows us to !manipulate projection of the map canvas “on-the-fly” as well as the spatial data! (vector and raster). For local mapping projects, the Universal Transverse Mercator coordinate system (UTM) is commonly used. Winnipeg is in UTM Zone 14 North, with a EPSG code of 32610. (EPSG code is a fast way to find the projection you need in mapping software such as QGIS). 


By default, a new QGIS project will open with a geographic coordinate system (EPSG 4326). UTM is also a preferred projection in many applications because it measures distances in linear unit (meters) while geographic coordinate systems use decimal degrees (latitude and longitude). In the following steps, we will transform the projections of all the layers we have imported so far to UTM 14 North. 

  • Screenshot of GIS data points overlayed on a map of Winnipeg.
  • If and only if your goal is to change how the map “appears” on your screen, you can simply change the map canvas projection.

    First, let’s change the map scale to 1: 50,000 (Yes, you can just [type 1:50000] at the bottom of the map. Pan your map so Winnipeg is at the centre of your screen.
    Because this is a geographic coordinate system, locations are determined in lat/long with a unit of degrees. (see numbers under Coordinate on the bottom of your map).

    See screenshot to the left.

[Click EPSG: 4326] at the lower right corner of the QGIS interface. A new window will pop out where you can change the map canvas projection. Again, this does not change the projection of the actual data! 
[Type 32614 in Filter -> Entre -> Double click WGS 84 / UTM zone 14N]
You will know this is the right zone because QGIS shows regions (red bar on the world map) covered by UTM 14N and Winnipeg is inside (the purple cross). Obviously if you are mapping for other regions in Canada, you will need a different zone (Canada covers 22 zones, from UTM 7N to 22N). See screenshot below.
[Click Apply] 
DO NOT zoom in or out. Do you notice how the scale has changed, even though it is still around Winnipeg. The location is now also determined using a UTM system with a unit of meters. !Scale is determined by the projection and in which unit locations are being measured! 

Also, hey! Our hexagons look a bit different now! Looks at these train tracks!

  • Map of Canadian Pacific Rail Yard in North End, Winnipeg.
  • Screenshot of "projection" panel in QGIS user interface.

Alternatively, we could also change the projection of the actual data, but it is beyond the scope of this lab. You will learn more about them throughout the studio or in my digital mapping course.

Section 4: Importing base maps into QGIS

That was intense? We will have some fun with QGIS in the last section. 
Base map is of popular demand in your design work, especially when you cannot physically visit the site. QGIS offers many base maps options, and you can stream it directly from the web (like Netflix but for base maps!). 

  • Screenshot of XYZ tile pane in QGIS user interface.
  • Scroll down in the Browser Pane (far left, top) until you see XYZ Tiles. As you can see, QGIS already comes with some popular base maps.

To load the base map, you can either double click the map you like or drag-and-drop it to the map canvas. Make sure base map is on the bottom of the Layers list.
I loaded the Google Road and turned off my hexagon layer so we can see the base map. 

  • Map of Canadian Pacific Rail Yard in North End, Winnipeg.

Let’s add more base map to the XYZ tile list in your QGIS. You will only need to do it once as long as you do not uninstall QGIS. 
[XYZ Tiles -> Right click -> New Connection] (This allows QGIS to add open-source base maps directly. If you are working on your personal computer, please make sure you have access to Internet). Here is a list of more URLs if you are interested in other types/styles of base maps. 
[Replace the Name and URL in the XYZ Connection window] (screenshot) with the list below. Leave all the other parameters as it is. 

  • OpenTopoMap: https://tile.opentopomap.org/{z}/{x}/{y}.png 
  • OpenStreetMap: http://tile.openstreetmap.org/{z}/{x}/{y}.png 
  • Google Hybrid: https://mt1.google.com/vt/lyrs=y&x={x}&y={y}&z={z} 
  • Bing Aerial: http://ecn.t3.tiles.virtualearth.net/tiles/a{q}.jpeg?g=1 

Impressed yet? Let’s add a few more! Please follow the steps outlined below. 

  • Screenshot of "XYZ connection panel" in QGIS user interface.

Since QGIS is an open-source software, it also allows users (like you and me) to create and upload plug-ins. Plug-ins are extensions of existing tools offered by QGIS’ built-in functions. It is often made by the people and for the people! 

We will be installing a plug-in called QuickMapServices that allows you to access an extensive list of base maps offered by Google, NASA, OpenStreetMaps, and many others. It is of course completely free. 

  • Screenshot of "install plug-in" function.

    [Plugins -> Manage and Install Plugins]

  • Screenshot of plug-in pane in QGIS user interface.

    [Search for QuickMapServices -> click Install]

  • Screenshot of Quick Map Services icon.

    After it installs, you should be able to find QuickMapServices button in the Web Toolbar. [Please click that icon to open the menu].

  • Screenshot of "visibility" pane in QGIS user interface.
  • [Settings -> More Services tab -> Click Get Contributed Pack]

    [Visibility -> Turn on/off the base maps you want / do not want to display in the menu -> Save]

    Now if you click on the QuickMapServices icon again, you will be able to see a long list of base maps for you to choose and they will be there as long as you do not uninstall QGIS or delete the plug-in.

The end!

Instructor Information

Yuhao Lu, Assistant Professor, Department of Landscape Architecture
Room 201H, John A. Russell Building
84 Curry Place, University of Manitoba (Fort Garry Campus)
Winnipeg, Manitoba R3T 2M6
Yuhao.Lu@umanitoba.ca