LABS OVERVIEW

Labs focus on deconstructing and reconstructing a drawing, diagram, map, or other visualization presented in lecture. Each lab will entail a step-by-step tutorial and a set of deliverables that demonstrate your technical grasp of the workflow and conceptual engagement with the media.


The assignment for each lab involves completing the tutorial, creating original work outlined in the deliverables, and posting your work-in-progress (WIP) on Are.na.

LAB SCHEDULE


Lab tutorials {T} and assigned deliverables {A} will become available during the class week indicated.

Lab 00: Boot up! or, Working with a Virtual Machine

-> Tutorial: SSDLAB – Virtual Desktop

Lab 01: Orient! Mapping North American Watersheds

-> Tutorial: Mapping North American Watersheds
-> Assignment

Lab 02: Classify! Redefining “Urban” Watersheds

-> Tutorial: Urban Watershed
-> Assignment

Lab 03: Project! Mapping Through Transects

-> Tutorial: Transects in QGIS and Illustrator
-> Assignment

Lab 04: Analyze! Generative Terrains
-> Tutorial: Generative and Analytical Terrains
LAB 01: WORKFLOW FOUNDATIONS > TUTORIAL

This foundational module lays the groundwork for creating and working with spatial media.



Premise and Objectives

Our first exercise covers the fundamental workflow that will be the basis for future lab exercises throughout the quarter: (1) loading and manipulating geospatial data in QGIS and (2) exporting your project in a form that will enable you to continue design work in another software environment. After completing this exercise, you will have:

  • Become familiar with the QGIS user interface
  • Learned the basics of adding, interpreting, and visualizing vector data in QGIS
  • Explored basic symbology techniques
  • Learned the basics of creating a print layout in QGIS and exporting a map
  • Imported a map to Ai
  • Troubleshoot an issue you encountered in the process

You will then post your work-in-progress to Are.na.


Prep

Download the data repository for this class from the G: drive or using this link and save the downloaded folder to your preferred working location. In this exercise, we will use the following datasets:


Note: Some of the datasets in the repository have already been preprocessed specifically for this exercise. Processing data is also essential to the workflow, and we will cover it in future exercises. 


Setting Up QGIS

Launch QGIS. Your new blank map project will look something like this:



Begin to familiarize yourself with the interface. Yours may not look exactly the same as the layout shown above. For instance, most toolbars and panels are movable, allowing you to set up your preferred workspace. You can always add or remove these workspace elements by clicking View > Panels or Toolbars (from the main menu bar). For more information, refer to this brief description of the elements of the interface.

Important Note: Like all GIS software, QGIS provides an environment in which we work with spatial data (whether vector- or raster-based). Datasets are not stored within QGIS. Instead, layers stored elsewhere are assembled within a map project where we can visualize, compare, manipulate, and analyze them together. Within the map project, we can also compose and export a map. Storing your data outside of the project allows you to include a particular data layer in several map projects without having to produce multiple copies of it, but it carries two important implications:

  1. Maintaining clear file organization is essential. The data layers associated with your map projects are linked to each project from their stored location. If those files are moved or reorganized, their links will break, and you will need to re-establish their linkage.
  2. GIS software continuously reads the path to each data layer, accessing the information stored within your datasets. We highly recommend a policy of no spaces in your path or file names to enable this reading smoothly (e.g. lab_proj_01).

Save your (currently empty) map project in your working folder by clicking Project > Save As on the main menu.

Your project was added to the Browser Panel in the Project Home folder.


Adding Data

There are several ways to add data to a project. We will begin by using the Open Data Source Manager button located on the Data Source Manager Toolbar. If this toolbar is not present, click through View > Toolbars > Data Source Manager from the main menu. 


In this exercise, we will be working with vector data. Vector data is a type of spatial data that represents geographic features as points, lines, or polygons. It is stored as a collection of geometric primitives of the same type, also referred to as feature class

  • Click Add Vector Layer (Vector) button to reveal the import options
  • Navigate to the Data/NA_Political Boundaries folder, which contains the “North_America” shapefile we will use for this project. Select the North_America.shp and add it to your map project (Alternatively, you can always use the Browser Panel to navigate through your files and drag them onto your project.)



A shapefile is a vector data format that stores the shape, location, and attributes of geographic features. Shapefiles are the most widespread format of vector data, due to their long history and wide support by GIS software. But they can also be cumbersome to manage. 

Leave the QGIS window briefly; open File Explorer and navigate to the shapefile you just added to your scene. You will notice several different file extensions here that may be unfamiliar. Shapefiles are actually collections of separate files that contain different information or perform specific roles. The primary component files are as follows:

  • .shp — The main file that stores the feature geometry (required)
  • .shx — The index file that stores the index of the feature geometry (required)
  • .dbf — The dBASE table that stores the attribute information of features (required)
  • .sbn and .sbx — The files that store the spatial index of features
  • .prj — The file that stores the coordinate system information


For more information on these extensions and others, see this explanation by ESRI.


Important Note: The collection of files constituting a shapefile must stay together in the same folder; otherwise, QGIS will not be able to load the layer or may not read it correctly.

Return to your QGIS project, and add the greatlakes_subbasins.shpne_lakes_north_america.shp and ne_rivers_north_america.shp to your scene (ignore any warnings that may pop up).

Rivers are represented by lines, and countries, lakes, and basins layers are represented by polygons. The order of the layers can be controlled with the Layers panel (click and drag to reorder). You can toggle layers on and off by clicking the check-mark next to their name, allowing you to choose which are visible when multiple layers are added to a project. Save your map project.



Note that the colors are the same for all features in a layer, and the assigned color is arbitrary. 


Attribute Table and Interactive Selection

Each line, point, or polygon in a feature class corresponds to an entry point in a data table — an Attribute Table. Attribute Table contains information about the features in the shapefile. Attributes can be descriptive, such as the name of a river or lake. They can also be quantitative, such as the length of a river or the surface area of a lake. To access the Attribute Table of a layer (and thus inspect the attributes of each feature), right-click on the layer name in the Layers panel and choose Open Attribute Table.



To quickly identify which polygon corresponds to a given feature within the Attribute Table, you can interactively select a feature by clicking on the row number. This will highlight the feature in the attribute table and the data frame.



Of course, the relationship between the geometry and attributes of a feature also works in the opposite direction. Using the Selection Tool from the Selection Toolbar (chosen in the GIF below), you can interactively select polygons and highlight them in the Attribute Table (make sure the layer you want to select features from is highlighted in the Layers Panel). Further, you can isolate selected features in the table: choose Show Selected Features from the Attribute Table’s filter drop-down menu. Click the Deselect Features button on the Selection Toolbar (or on the Attribute Table’s Toolbar) to deselect any selected features.



Click the Pan Map button on the Map Navigation Toolbar to exit the Select Features tool.


On your own: interactively select and inspect features and attributes of the all added layers.


(A Very Short) Intro to Projections and Coordinate Reference Systems

Map projections are mathematical transformations used to represent a three-dimensional shape of the Earth on a flat surface. Every time we display a geospatial dataset on a computer screen, a map projection is involved. They are powerful, complex, fun, but can also be frustrating to work with. 

We will cover projections and coordinate reference systems (CRSs) in future exercises, but for now, just be aware that QGIS automatically sets your project’s CRS to the one specified by the first shapefile you bring into your project (that’s what the .prj file of your shapefile ir for).  To find out what CSR you’re in, check the Status Bar (bottom right corner of your window):


There will be a letter and number code, here EPSG:4326. Double-click on it, and the CRS dialogue will pop up; you’ll see any recently used CRSs, a library of predefined CRS options that come with QGIS (over 7,000!), and the specific information about what CRS is in current use:


There are many projections for many uses; some are created by governmental agencies for use at a very specific scale (for example, each state has its own CRS that is optimized to minimize distortions for that scale), while others are meant for global use. The one we’re using, WGS84, is the standard CRS for global use, and is specified by the majority of global datasets.

The next step is to change the CRS. While there are quite a few complicated steps going on behind the QGIS curtain, from the user’s point of view it’s a fairly straightforward process. In this example, let’s choose USA Contiguous Albers Equal Area Conic (ESRI: 102003) which, as the name suggests, is centered to the contiguous USA, and is developed to preserve surface area properties of the features in this region:



Intro to Symbology

Now that we’ve set up the desired CRS, it’s time to change the appearance of our layers. To start, we will change the background color from white to blue.

Click through Project > Properties and in the General tab, change the Background Color to the desired blue (the data frame’s background color is serving as the color of the area not covered by any layers):


Next, we will set the symbology of the countries layer to appear like a borderless blue continent:
  • Right-click on “North_America” and choose Properties…
  • In the Symbology tab (third from the top), choose Single Symbol (default)
  • Click on Simple Fill, set the Fill Color to blue (darker than the background blue), and Stroke color to Transparent Stroke
  • Click Apply and OK.



Repeat the process for the subbasins (setting the Fill color to an even lighter blue) and lakes (setting the Fill color to white). Finally, set the river colors to white. For the rivers, represented by lines, set the Simple Line color to white. Click OK .



What if we want to add hierarchy in the way we represent rivers and have the widths of the river centerlines to correspond (in relative terms) to the sizes of their drainage basins? Luckily we have a field in the shapefile’s Attribute Table –  strokeweig – precisely for that purpose. Open the Attribute Table of the rivers layer again and notice that the strokeweig values range from 0.2 to 2. Next, open the layer’s symbology tab again (by double-clicking on the layer name in the Layers Panel) and follow these steps:

  • Change the Symbology from Single Symbol to Graduated
  • Set the Value to strokeweig
  • Set the Method to Size
  • Set the size range from 0.1 to 2
  • Change Mode to Natural Breaks (Jenks) 
  • Set the number of classes to 5 and click Classify
  • Click OK and close the Layer Properties dialogue box



Voilà! Save your map project.

On your own: What happens if we change the Value from strokeweig to  scalerank? Experiment with colors and other symbology settings of your layers.


QGIS Print Layout end Exporting

You’ve just completed the first (and most extensive) part of this workflow sequence. The following part covers the basics of creating a print layout in QGIS and some considerations for cartographic design in general. The covered technical material allows you to move your QGIS projects from map space to paper space and export your work either in a print format or in a form that will enable you to continue design work in another software environment.

So far, you have worked within QGIS’s Map View, adding and symbolizing geospatial datasets. This environment lets you view your data from whatever spatial scale you set through the zoom and pan settings in the map canvas view. We can refer to this environment as data space. To export your work from QGIS to be viewed as a static image outside of the program, you must fix the spatial scale and extent of your map. This can be understood as paper space. The Print Layout function within QGIS is a tool that enables this transition.

The transition from data space to paper space also opens up the opportunity to think about aspects of cartographic design that are not relevant when performing analysis in QGIS, but are relevant for informing and orienting your audience to the geographic context of your map.

How will you convey the meaning(s) of the chosen symbols?

Maps typically have:
  • a legend that explains the symbols and colors used on the map
  • an indication of scale (either a scale bar or, in the case of printed maps, a ratio scale or written scale, 1"=1000' for example)
  • a note showing the projection used
  • a north arrow
  • citations for all data sources
  • the name of the cartographer and/or publisher
  • (sometimes) a grid or a graticule to convey the coordinate reference system

You can add those map features in the When you are satisfied with your symbology choices and are ready to export a map document from QGIS, you will need to create a new Print Layout.


Select the New Print Layout tool in the main toolbar or click through Project>New Print Layout from the top menu. You will be prompted to specify a name for your new layout. Each QGIS project can have multiple associated print layouts, so choose a descriptive name for the layout you are hoping to create so that you can distinguish it if you ever add an additional layout view.


To set up page dimensions and add a map item, follow these steps:
  • Right-click anywhere on the blank page and choose Page Properties… (the Item Properties menu will appear on the right)
  • Specify the dimensions of the page: 1080 x 1080 px

 

On the left toolbox, click Add Map and then click and drag on the paper a rectangle over the area on your page that you want the map to cover:


  • Click Move Item Content to pan to the desired area (this allows you to navigate through data space within the Print Layout tool)
  • Set the desired scale in the Item Properties tab




At this point you may want to go back to the data view to adjust your layers’ symbology settings to better fit this particular layout size and scale (for example, I changed my rivers centerlines widths by setting the new size range from 0.1 to 1).

If you close the Layout window, or want to work on a different layout, you can do so by clicking on the Layout manager in the main toolbar and the list of your project’s saved layouts will pop up:


We will explore more Layout tool functionalities in the coming weeks, but for now, let’s wrap up this section by exporting our map. Save your project.

You can export your layout as an Image, SVG, or PDF by either clicking through Layout > Export as… in the main menu or by clicking their corresponding buttons on the Layout Toolbar:


Notes on Workflow

It’s possible to use the Print Layout tool within QGIS to design complete and visually compelling maps. However, it is generally much faster to use the Print Layout as a part of the larger workflow to:
  1. Define a map/paper/artboard size
  2. Set the spatial scale/extent of your map(s)
  3. Add any orienting map elements (scale, legend)
  4. Export to continue your work in a dedicated graphics editing software

Exporting maps with vector-based data in SVG format allows you to manipulate your data layers' style, symbology, or overall composition in Adobe Illustrator or another vector graphics software.

Choose Export as SVG… and ensure you have the following options checked:



Export the SVG file in your working directory and save your project. Close QGIS.

Important: Continue using best practices for file organization, management, and naming conventions; consider exporting all QGIS files into a subfolder, e.g L01_qgis-exports


Opening Illustrator

Launch Illustrator. You will be prompted to choose a template for your project: several options exist for different kinds of print and digital work (similar to QGIS layout presets). We can customize options here, including the standard size, orientation (portrait or landscape), and the number of “artboards” — you can think of an artboard as an analog to a canvas or drawing surface. You can also give the file a name in the “More Presets” dialogue. Once you click Create, AI will create your new project document. You may also skip the “More Presets” step and create a document directly from the previous dialogue.



Begin to familiarize yourself with the interface. It should look something like this:


Depending on which “workspace” you’ve selected (Window > Workspace) you’ll see different tools (left) and panels (right). The default option is called Essentials.  Like in QGIS, the toolbars and panels are movable, allowing you to set up your preferred workspace. You can always add or remove these workspace elements by clicking Window and selecting the different panels you’d like to display or use, or you can “undock” and drag them around.




Adding Artwork

Next, open your SVG file by dragging it from Finder/File Explorer to your workspace. Note that this will open a new document in a separate tab. You can actually skip the process of creating a new document if you aim to edit an existing Ai-editable file (such as an SVG we just exported from QGIS):


Open your Layers Panel (to the right), and note that the data layers from QGIS (including the background) are all preserved as separate sublayers of the “Layer 1”:



Just like in QGIS, you can control the order of the layers in the Layers panel (click and drag to reorder), and you can toggle layers on and off by clicking the little eye icon next to their name. You can also “lock” individual layers by clicking the little padlock sign next to their name, which will prevent you from accidentally moving or deleting any layer features.

Now, toggle all layers off except the background and the “North_America”:


If your artboard looks like the image above, you must be thinking: “Oops! This doesn’t look like North America. What now?”

Let’s assume you’ve gone back to QGIS, and re-exported the SVG (and triple-checked the settings were correct), but the problem persists... Unfortunately, this is widespread in these types of workflows: one of our layers got broken down in the process, and we cannot correctly display it in Illustrator. (Your geometry will break down more often if you’re changing coordinate systems in QGIS, which we did).

Luckily, there are many ways we can troubleshoot this issue. We will offer three approaches below, and we are agnostic as to which one you choose to pursue (although we recommend exploring all three on your own!).

Option 1
You’ve realized that you don’t need to include features representing the continent for your map to convey what you want. This is legitimate and often the best solution when the layer in question is there only to provide a background/context to your map (it wouldn’t work for the rivers layer, obviously).

In this case, all you need to do is toggle off or delete the layer, and you can export a finished map (or continue editing other features that are displayed correctly, of course).

Option 2
You’ve figured out a “hack” by separately exporting only the “corrupt” layer from QGIS, but this time as an image (raster file) instead of an SVG (vector file). You will then import this image into your Illustrator file and replace the faulty linework. To do so, follow these steps:

  • In QGIS, toggle off all layers except countries (North_America)
  • Open the Layout tool and proceed with the export; choose Export as image and select PNG format



  • In Illustrator, delete all objects in the “North_America” layer



  • In the Illustrator’s menu bar, click through File > Place... and select the PNG image you just exported
  • Click on the top left corner of the artboard; the image should populate the entire artboard 
  • A “<Linked file>” will appear as an object in the Layer 1
  • Drag it to the (now empty) North_America layer and lock the layer


Toggle the visibility of the basins, rivers, and lakes, and you should be done!

Option 3 (most elegant)
You’ve decided to look for another (polygon) shapefile representing countries or continents that won’t cause you any trouble during export. You got lucky: Natural Earth has a dataset called Land (Land polygons including major islands), which does precisely that!

In this scenario, all you need to do is download the “Land” dataset and use it in this exercise instead of North America (you may notice that the “Land” is a global dataset, but that shouldn’t be a problem for completing the work; just zoom into North America and ignore the other polygons).



Exporting Artwork from Illustrator

When you’re done troubleshooting and editing linework, it’s time to export your drawing.

To export a vector file format such as an SVG or PDF (which can be significantly resized without losing any of their quality), navigate to File > Save a Copy... and choose the desired file format.

To export a pixel-based raster file like PNG or JPG, navigate to File > Export... and choose the desired format.

If you want to export an image cropped to the exact dimensions of your artboard (as opposed to cropped to your artwork), select Use Artboards in the Export dialog box.



LAB 01: WORKFLOW FOUNDATIONS > ASSIGNMENT

For Lab 01, we want you to demonstrate you’re comfortable with the foundational QGIS -> Illustrator workflow outlined in the tutorial.


DELIVERABLES

Post a PNG or PDF of your QGIS-based or Illustrator-based work-in-progress (WIP) to the Work-in-Progress channel on Are.na, including a short write-up of about 300 words. Follow the formatting guidelines in the syllabus, and the detailed drawing and write-up guidelines below.

Drawing Guidelines


Your drawing simply needs to show that you can complete the workflow, and that you've spent a little time experimenting with graphic composition in QGIS (and, if you are comfortable doing so, Illustrator). You may use whichever colors, lineweights, and other graphic elements as long as you can offer a thoughtful justification for your decisions. Your drawing should:

  • compositionally approximate the precedent drawing from the Third Coast Atlas

  • include stylized geometry from each of the datasets introduced for the lab
    • for the rivers, make sure your design decisions are based on scale rank classification

  • show that you've experimented with symbology (color, lineweight) and composition in QGIS


If you're ready to experiment further, feel free to do so! These guidelines are simply meant to provide a baseline for future workflows, and you are welcome to dive deeper for this assignment if you choose.

Write-up Guidelines

Write-ups should generally offer a short (around 300 words) but critical reflection on your technical and conceptual workflow. This means thinking about your experience with the technical process, design decisions regarding tools used and graphic choices, and a broader, critical consideration of how the exercise connects to themes, genres, and questions of spatial media.

Here are a number of possible prompts to guide your reflections; you do not need to answer them directly, nor do you need to answer each one.

As you work through the tutorial, consider a set of questions regarding your  technical workflow: 

  • What do you know about the data you're working with? How does that knowledge inform your design decisions regarding symbological manipulation in QGIS (or graphic manipulation in Illustrator)?

  • What are the advantages and disadvantages of manipulating your linework symbologically in QGIS?

  • Why is it important to export your linework in SVG or PDF?

  • Based on your experience in QGIS, what might Illustrator allow you to do differently?

  • Are there any "break-downs" in your workflow? If so, what kinds? Are these break-downs traceable to knowledge-based constraints or tool-based constraints?



Consider a further set of questions regarding your conceptual workflow.

Despite the foundational objectives of this lab, the exercise poses important and recurring conceptual questions. These include (though are certainly not limited to) questions regarding geospatial data and linework.

“Data,” a word borrowed from Latin, literally means “that which is given.” But data always has a complex technical, social, and political history. To get at the “genealogy” of the data, always begin with the basic journalistic “5W+H” questions:

  • Who made these data, and for whom?

  • What exactly do these data represent?

  • When was the dataset originally made? Has it been modified, or is it entirely new? How many versions have there been? Are there plans to update it?

  • What geographic extents (where) does the data cover, and how are those extents determined?

  • Why were these data made, and with what purposes and users in mind?

  • How are the data made in the first place? How are those representations geometrically and graphically constructed from the data? How are they classified, and what are the bases for those classifications?


Many of these questions can be partially answered (at least in the most basic factual form) by examining metadata. A well-documented dataset will typically (but not always!) include an .xml file containing its contextual metadata, which can be opened in a plain-text editor (as opposed to a rich-text editor like Microsoft Word or Apple Pages) like Text Edit, Notepad, Sublime Text, or Atom. We will discuss metadata in further depth in coming weeks, but always look for that file; it will usually point you to further documention via a website where the data are hosted, a scientific paper where the data were developed and/or first published, etc. If it’s absent, you should track down where the dataset came from.

Understanding the nature of these datasets opens up further questions into linework. Like data, we will say much more about lines, but most simply, we must always ask of linework: what work does a line do to transform data into geospatial data, and geospatial data into geographic information through which we understand space, place, location, mobility, and other geographic "elementals"?

For this exercise, consider in light of your genealogical interrogation of the data:

  • For these particular datasets, why are rivers represented as lines rather than polygons? What difference does that make to understanding a river as a geographic (rather than merely geometric) entity?

  • How (or perhaps more precisely, when) are polygonal boundaries of, for instance, a lake edge or a continental shoreline determined? What does this say about convetional representations of the edge between land and water?

  • What do the geometries of rivers and lakes (as represented in these datasets) suggest about their geographies? (Consider in particular the geographic dynamism of water bodies.)

  • What geographic patterns emerge through different symbological choices? At which scale(s)?

  • What does the continental and/or basin-scale representation of water systems suggest about different ways to imagine territory or regions?

  • How might different representations of water as a dynamic element reveal alternative "hydrographies" beyond well-delineated bodies of water? What kinds of lines might do that work?




LAB 02: CLASSIFY! Redefining “Urban” Watersheds > TUTORIAL

Mapping is more than a mere display of spatial information; it is a critical, analytical, and interpretive act. This module builds on the previous one and introduces basic geoprocessing operations and design decisions you’ll encounter in working with two foundational types of geospatial data: raster images and vector geometries.



Premise and Objectives

Our second exercise builds on and expands the tools and concepts introduced in the introductory module. After completing this exercise, you will have the following:

  • Learned data selection methods using tabular and spatial queries
  • Explored basic techniques for labeling features
  • Learned the basics of adding, interpreting, and visualizing raster data in QGIS
  • Learned the basics of merging and dissolving vector features in QGIS

You will then post your work-in-progress to Are.na.

Important Note: Completing {T01} is a prerequisite for following this exercise. It is assumed that you mastered the workflow basics from the previous week.

Prep

If you’re working in the SSDLAB virtual environment, copy the data repository for this exercise from the shared drive (G:) to your working location (U:). If not, download the data using this link. In this exercise, we will use the following datasets:



Set-Up

Launch QGIS. Using the Browser Panel, add all LAB 02 vector data to your scene and save your map project.


Double-click the CRS code in the status bar to open the Project Properties – CSR dialogue box. Set the Project CSR to NAD83 / Great Lakes and St Lawrence Albers (EPSG: 3175):


Click OK and close the Project Properties window.


Data Querying 1: Select by Attributes

In the previous exercise, we familiarized ourselves with the interactive selection methods using the Selection Tool from the Selection Toolbar or clicking on row numbers in the layer’s attribute table. Another selection technique is to directly query the Attribute Table based on the fields and values within the dataset — a method usually referred to as Select by Attributes.

Open the attribute table of the  Populated Places(popPlaces) point shapefile and observe the information stored in various fields. Note that some fields contain nominal information – e.g., name, while others contain quantitative (ordinal) information – e.g., population class (POPCLASS), which ranks cities from 1 (least populous) to 5 (most populous). By querying the Populated Places dataset, we can answer questions such as:

  • How many cities in the dataset have the status of national or provincial capital? Or,
  • What cities in the dataset have a population rank of 3 or higher?

To answer (and visualize) the latter, we will first select a subset of features from the Populated Places layer with the population class 3,4 or 5. Then we will export them as a separate layer.

There are multiple routes to select features within a dataset: either we can open its Attribute Table and click on Select features using an expression button or select the dataset in the Layers panel and navigate to Edit > Select > Select features by Expression... option. (The same icon should show up as a new shortcut button in your toolbar once you have performed this action once.) Either route will open the Select by Expression dialogue box:


We want to select just those cities with the population class 3 or higher. To do this follow these steps:

  • Expand Fields and Values
  • Double-click on the POPCLASS field and it will appear in the expression box on the left (the Values sub-window will appear on the right)
  • Click All Unique (this will load all five unique field values)
  • Expand Operators
  • Double-click >= (greater than) operator
  • Type 3 (or click POPCLASS and All Unique again, and double click 3 on the right)
  • Your query should look like this: "POPCLASS" >= 3
  • Click Select features



Open layer’s attribute table again. The header will tell you how many features were selected: we have selected 345 populated places.

We will now save those 345 features as a separate shapefile:
  • Right-click on Populated Places in the Layers Panel and choose Export > Save Selected Features As...
  • The Save Vector Layer as… dialogue box will open
  • Set “Format” to ESRI Shapefile
  • Navigate to your working folder and save shapefile as popPlaces_NA_popClass_3-5.shp
  • Toggle off the original Populated Places layer

On your own: Take a moment to inspect the values in the CAPITAL field, and then create a separate shapefile containing only populated places that are either national (2) or state/provincial (1) capitals.


Data Querying 2: Select by Location

The Select By Location tool allows you to select features based on their location relative to features in another layer. In this instance, we want to extract populated places that are within the Great Lakes Watershed. 

On the main menu, navigate to Vector Research Tools Select By Location
The Select by location dialogue box will open. Set the following parameters:
  • “Select features from” → popPlaces_NA_popClass_3-5
  • “Where the features…” → are within
  • “By comparing the features from” → greatlakes_basin
  • Click Run



Export the selected features as popPlaces_GL_popClass_3-5.shp. If you wish, edit the basic symbology settings of your data layers. Save your map project.


Labels

Labels are textual information displayed on maps, adding details you could not necessarily represent using symbols or geometry. In a GIS software environment, a label refers to a piece of text on the map that is dynamically placed and whose text string is derived from one or more feature attributes. Technically, any information stored in the Attribute Table of a vector layer can be textually displayed as a label on a map.

To label cities on our map follow these steps:
  • Right-click on the Populated Places (popPlaces_GL_popClass_3-5) layer and choose Properties...
  • In the Labels tab (fourth from the top), choose Single Labels
  • Set “Value” to NAME
  • Choose desired label font, style, size, and color (refer to the “Text Sample” appearance)
  • Click OK

This will display the names of all populated places in our feature class:




To label only a subset of the populated places, we can create a filter querying the Populated Places feature class within the Labels tab using expressions (the same method we used to Select by Attributes):
  • In the Labels tab, choose Rule-based Labeling
  • Click Add rule (green “+” button) and a new window will pop up
  • Open Expression String Builder by clicking the ε button by the “Filter” field
  • Build a query, e.g. “POPCLASS” = 4
  • Scroll down and set desired label font, style, size, and color
  • Click OK and save your map project


Adding Raster Data

Navigate to ..Data/Raster/ folder in the Browser panel and drag GHS_BUILT_S_E2020_GLOBE_R2022A_54009_1000_V1_0.tif (GHS Built-up Surface Grid) and  GHS_SMOD_E2020_GLOBE_R2022A_54009_1000_V1_0.tif (GHS Settlement Model Grid) to the scene. Toggle off the visibility of all other layers.

Raster data consists of a matrix of pixels (or cells) organized into a grid. Each pixel contains a value representing information:

  • In the case of Built-up Surface Grid, the value (unit) represents the number of built-up square meters in a 1 x 1 km grid cell
  • In the case of Settlement Model Grid, the value represents a specific settlment typology, e.g. a pixel holding the value of 30 denotes an “Urban Centre grid cell”, whereas the value of 11 stands for “ Very low density rural grid cell.”



Examples of other types of raster data include multi-spectral satellite imagery, elevation (DEM), population (cell values corresponding to the number of people living in each grid cell), various land use/land cover datasets, etc. 


Raster Clipping

If you zoom out from the Great Lakes watershed, you will notice that both rasters added to our scene are global datasets, meaning you can work with them on a planetary scale. Sometimes, however, you will want to perform spatial analysis on a particular region or clip and display just a portion of your raster. Clip raster by extent and clip raster by Mask Layer are tools that allow you to extract a part of a raster dataset based on a template extent. In the spirit of situating ourselves in the Great Lakes watershed, we will clip both Global Human Settlement layers by the Great Lakes basin polygon:

  • In the main menu bar, click through RasterExtraction > Clip Raster by Mask Layer…; a dialogue box will pop up
  • Set the Input layer to GHS_SMOD_E2020….tif
  • Set Mask layer to greatlakes_basin
  • Make sure Match the extent of the clipped raster to the extend of the mask layer… option is checked
  • Click Run and close the dialogue box


Repeat the same raster extraction process with the Built-up layer as input. Save the clipped raster(s).


Raster Symbology

Next, we will change the appearance of our Global Human Settlements grids.

Open the Properties menu for the Built-up (clipped) layer and navigate to the Symbology tab. You’ll notice that this looks different from the style menu we have worked with for our vector layers. Instead of Symbol type, we have a “Render type” field and many options for how to color the bands in our dataset. Since we are working with a single-layer grayscale image, our symbology options are relatively limited. Still, we can experiment with color gradients. (Raster datasets can be made up of multiple bands, such as multispectral satellite imagery. We would better showcase the full power of raster symbology if we were working with such images, but that’s outside the scope of this tutorial.)

If you look at the expandable section labeled Min / Max Value Settings, you will notice that the minimum and maximum values for Color gradients do not need to correspond to the absolute value range of the raster (in this case, the value ranges between 0 and 511,437); they can also be calculated based on a Cumulative count cut, or Mean +/– standard deviation * X, both of which are used to get rid of outliers. The Cumulative count cut means that QGIS is only taking into account the values between 2% and 98%, in the default case. Do this and click Apply to see how the image changes:


Now change the “Render type” to Singleband pseudocolor to get something more similar to a symbology we would do for a vector file:
  • Set the Mode from Continuous to Equal Interval
  • Change the “Color gradient” to a ramp with at least three distinct colors
  • Click Classify to load the values and then hit Apply to see it on the map
  • Save your map project


On your own: experiment with color gradients, switching between from Continuous and Equal Interval modes.

Finally, we will change the appearance of our Settlement Models grid. As mentioned previously, the numerical values of this raster represent specific settlement typologies. Here is the full breakdown (from the GHSL documentation):


  • Class 30: “Urban Centre grid cell”, if the cell belongs to an Urban Centre spatial entity;

  • Class 23: “Dense Urban Cluster grid cell”, if the cell belongs to a Dense Urban Cluster spatial entity;

  • Class 22: “Semi-dense Urban Cluster grid cell”, if the cell belongs to a Semi-dense Urban Cluster spatial entity;

  • Class 21: “Suburban or per-urban grid cell”, if the cell belongs to an Urban Cluster cells at first hierarchical level but is not part of a Dense or Semi-dense Urban Cluster;

  • Class 13: “Rural cluster grid cell”, if the cell belongs to a Rural Cluster spatial entity;

  • Class 12: “Low Density Rural grid cell”, if the cell is classified as Rural grid cells at first hierarchical level, has more than 50 inhabitant and is not part of a Rural Cluster;

  • Class 11: “Very low density rural grid cell”, if the cell is classified as Rural grid cells at first hierarchical level, has less than 50 inhabitant and is not part of a Rural Cluster;

  • Class 10: “Water grid cell”, if the cell has 0.5 share covered by permanent surface water and is not populated nor built.

Rasters like this one typically don't offer as many possibilities to experiment with symbology, given their limited number of values/classes and the fact they usually come with documentation that specifies not just nomenclature but also their color definitions:


Although you should always familiarize yourself with such conventions, we encourage you to challenge that approach and suggest different modes of representing the above categories. For example, you could split them into two (built-up/non-built-up) classes by assigning one of just two colors to each class (e.g., 10-13: grey, 21-30: red) or apply an entirely different set of colors (or gradients!) than the one from the official documentation.

To do so, open the layer’s Symbology tab and set the Render type to Paletted/Unique values, and experiment with the settings:



Wrapping Up and Exporting

When satisfied with your symbology choices, make the vector layers visible again and produce a final composition. (Choose just one of the two raster layers for your final map.)

Important: If exporting a map for further editing in Illustrator, remember to export your vector layers separately from your raster layer(s): rasters as png or jpg and vectors as svg.



>> TUTORIAL APPENDIX: REDEFINING WATERSHEDS <<


Dissolve Tool

The polygon shapefile representing the Great Lakes basin used in this exercise is technically a derivative of the greatlakes_subbasins.shp shapefile from Lab 01.

The tool used to break the common boundaries of the adjacent subbasins is called Dissolve. To access the tool (and thus create a Great Lakes Basin shapefile yourself), navigate to Vector > Geoprocessing Tools > Dissolve in the main menu. Set the input layer to greatlakes_subbasins.shp and remember to save the dissolved layer to your GIS-Outputs directory (otherwise, the tool will generate a temporary layer on the scratch disk that you won’t be able to use outside this QGIS file).



Merge Tool

Sometimes you must combine multiple vector layers (of the same geometry type) into a new, single feature class. For example, to complete this week’s assignment, you may decide to merge the Great Lakes Watershed with (the subbasins of) the Mississippi River Watershed and create a unique 3/4 Coast Watershed encompassing the two interconnected hydrological systems with the city of Chicago in the middle. To do so, you will use the Merge tool. To access the tool, navigate to Vector > Data Management Tools > Merge Vector Layers in the main menu. Set the Input layers by clicking on the button and save the merged layer to your GIS-Outputs directory:



Use the newly created shapefile as the basis for the Lab 02: Urban Watershed assignment.

Note: The additional hydrological data to complete the exercise is uploaded toG:/2024_WNTR_ICSM/LAB_02/1_Data/Additional Data folder and to the Dropbox repository.






INTRODUCTION TO CRITICAL SPATIAL MEDIA / CEGU 23517 / ENST 23517 / ARCH 23517 / DIGS 23517 / ARTV 20665 / MAAD 13517 | WINTER 2024

INSTRUCTORS: Alexander Arroyo, Grga Bašić, Sol Kim

URBAN THEORY LAB   |   COMMITTEE ON ENVIRONMENT, GEOGRAPHY, AND URBANIZATION   |    UNIVERSITY OF CHICAGO