This workshop is the result of a 2018-2019 collaboration between Tyler W. Davis, Department of Environment and Sustainability at Catawba College, North Carolina and Matthew Forrest, Department of Art at Georgia College, Georgia. Funding was provided by a grant by Georgia College. Find out more about the collaboration at Catawba College News.
Instructions are updated (Fall 2021) to include the latest raster data type provided by USGS TNM (i.e., from Esri grid to geotiff) and the latest update to QGIS LTR (i.e., from version 2 to version 3).
Welcome to the lab for creating art from science and technology!
By the end of this lab, students should:
The science and technology we will be exploring comes in two parts: the software and the data. Let’s take a look at both.
“GIS is like the machinery that transforms data into the commodity–information–that is needed to solve problems or create opportunities.”—DiBiase (2018)
Look around. There is information all around you. Buildings, roads, waterways, parks, cities, bus stops, nature preserves. Just about everything we see in the spaces that surround us can be defined as existing at a particular location at a given time. This is spatial data.
When we think of spatial data, we tend to ask questions regarding the “what” and the “where” of things. These are important questions for planning and resource management. Because of the importance of spatial data, we have developed a set of tools called geographic information systems (GIS) that we use to gather and use this information.
The breadth of GIS encompasses the latest technology of advanced communication networks and software down to the simplest hand-drawn field maps. Modern technology is changing the way we use GIS and the methods in which we gather and use spatial data is continuously evolving.
Note that many GIS software packages exist—some quite specialized, others quite broad. In this lab, you will use QGIS (https://qgis.org)---an open-source geographic information systems (GIS) program.
QGIS has evolved in recent years to being a strong competitor as a personal GIS platform. QGIS has a decent user interface and it is also possible to script and automate analyses.
One of the strengths of QGIS is that—in addition to providing a GIS interface of its own—it also integrates tools from a range of other GIS programs. These include:
“There’s power in knowing where potentially anything in the world is.”—Greg Milner, journalist and author
The data we will explore is related to the discipline of water resources engineering.
Earth is 75% covered with water; however only about 2.5% is freshwater—the water that you and I use on a daily basis. The majority of Earth’s freshwater is inaccessibly frozen in sea ice and glaciers. Of all our freshwater, only 0.3% is found in rivers and lakes—our only renewable freshwater resource.
Water resource engineers are tasked to understand how water moves through the natural environment and take measurements to analyze the changes that occur over time. This information is used for managing our freshwater resources and to provide clean water to our growing population while not disrupting the natural environment.
One rule that water resources engineers live by is that water always runs downhill. This is helpful because we can use the shape of the land to help us estimate the amount of water collected by the landscape when it rains. One way we measure the shape of the land (also known as the land’s topography) is by using what is called a Digital Elevation Model (DEM).
The United States Geological Survey (USGS) has a National Geospatial Program for delivering high-quality topographic information to the nation. This information is provided free of cost to researchers, government officials, and to the general public.
The land surface elevation data for the United States were originally derived from diverse sources of various qualities and were processed and standardized for convenient use. In 2015, a new technology called LIDAR (light detection and ranging) became the new standard for high-quality land-surface elevation mapping. In LIDAR, lasers mounted underneath an aircraft bounce light off the surface of the earth and by measuring the time it takes for the light beam to return, we can get an accurate measure of land surface elevation. The measurements are then averaged to give single values to a representative area of land—this process creates what is called a digital elevation model or DEM for short. The DEM looks like a digital photograph; however, instead of each pixel in the image representing a color (as would be represented in a color photograph), each pixel represents the height of the land surface above sea level. Typically, DEMs are represented in monochrome.
The major water resource for Milledgeville, GA is the Oconee River—fed by Lake Sinclair with headwaters as far north as Gainsville and Lula in the foothills of the Blue Ridge Mountains in northern Georgia. The area of land that drains into the Oconee River (highlighted in yellow in Figure 1 below) is a part of the larger Altamaha River watershed.
Figure 1. The Oconee River Basin (highlighted in yellow) located in Georgia. Map of river basins in Alabama and Georgia provided by the Georgia-Alabama Land Trust. http://www.georgiaalabamalandtrust.org
The original instructions use the older LTR (long-term service release) of QGIS, which is version 2.18 ‘Las Palmas’ (note that shortly after this workshop was released, the 2.18 LTR is no longer supported, but can still be found in the archives at https://qgis.org/downloads/). As of Fall 2021, the LTR of QGIS is v.3.16.11.
If you want to install QGIS on your own computer, simply go to the QGIS website:
and download the installer for your operating system (it is available for all major OS’s including Windows1, Mac2 and Linux3).
For help using QGIS, you may wish to consult the QGIS Documentation.
Elevation data is available from The National Map found at the following web address:
In the menu on the left-hand side of the website, check the box next to “Elevation Products (3DEP).” In the submenu, leave “1/3 arc-second DEM” checked. Note that 1/3 arc-second means that each pixel represents approximately a 10 meters square.
Next, in the Search location bar of the mapping region on the right-hand side of the website, type “Milledgeville, Georgia” and click “Go.” The map should zoom over the city of Milledgeville.
Back to the left-hand side of the website, you should see a blue button at the top of the screen that says “Search Products.” Click the button to open the Products menu.
You should find that there is only one or two results. Hover your mouse over the return options and the one that grays the map over Milledgeville should be
In the Actions box next to the data product, click on the “Thumbnail” link to see a preview of the DEM in the mapping area. You may have to zoom out of the map view to see the whole extent. You will notice that this is only a fraction of the Oconee River basin—to get the whole basin, we would have to download five more DEM tiles.
In the Actions box next to the data product, click on the “Download Link” and save the TIF file (USGS_13_n34w084.tif; 455 MB) to your computer (remember where you save it; most modern web browsers default saves to the Downloads folder).
While the file is downloading, click the “Info/Metadata” link to open a new webpage to review the metadata (or data about this data). This page provides critical information, including when the data were created, the citation required for any publications using this data, a thumbnail image and extent outline. Looking at the summary statement, we can skim down to the following:
“These data are distributed in geographic coordinates in units of decimal degrees, and in conformance with the North American Datum of 1983 (NAD 83). All elevation values are in meters and, over the conterminous United States, are referenced to the North American Vertical Datum of 1988 (NAVD 88).”
The important bits of information to note here are the geographic coordinate system, North American Datum 1983 (NAD83), and elevation units (meters).
The spatial data we will be using is in a format called a raster.
Raster data is the GIS term for gridded data: an equally spaced grid where each cell (or pixel) has one value (digital number or DN) that represents the dominant value of that cell. These values can be continuous (e.g. elevation or temperature) or discrete (e.g. population densities or habitat categories). Sometimes raster data may contain null or ‘no data’ cells. Examples of raster data include photographs, satellite imagery, and digital elevation models. Figure 2 below shows the common pixelation property of raster data.
With QGIS installed, launch the QGIS Desktop app.
Once the software has loaded, you may be greeted with a Tips! popup, which you can dismiss.
Click on the New button, , in the toolbar to open a new blank project.
Click the Save As button, , in the toolbar and save your project somewhere on our computer (e.g.,
C:\Workspace\GIS\project1.qgs).
Note that the .qgs project file does not save any spatial data. The project file references spatial data files that are saved elsewhere on you computer (for example, the elevation data you just downloaded and saved on your computer) and the project file also saves any display preferences you have selected.
Important points:
If, for some reason, your new project did not open, double-click on the project file name under “Recent Projects.”
Take a look at the software’s graphical user interface (GUI)—an example is shown in Figure 3 below—and take notice of its features. Yours may look different from the figure shown.
Figure 3. QGIS GUI with Alaska sample data. The GUI is comprised of five components: (1) Menu Bar, (2) Toolbars, (3) Panels, (4) Map View, (5) Status Bar. Note that yours may look slightly different depending on the type of computer you are using. Image from QGIS GUI (https://docs.qgis.org/3.4/en/docs/user_manual/).
To add the elevation data we downloaded to our QGIS project—which is in raster format—click on the “Data Source Manager” button, . Then click the “Add Raster Layer” button,
, found in the left-hand menu.
Navigate to where you saved the downloaded file with the elevation data (e.g., USGS_13_n34w084.tif) and click “Open,” click “Add,” then click “Close” to exit the Data Source Manager.
Notice that the raster layer has been added to the Layer Panel and in the Map View, you should see the elevation data similar to what is shown in Figure 4 below.
Figure 4. Elevation raster data over Milledgeville, GA.
To change the style of our data, first open the Layer Properties by double-clicking the layer name in the Layer Panel (see Figure 3 for location of Layer Panel).
Click on “Style” in the left-hand toolbar to view the Style menu. There are three main drop-down areas in the Style menu. Below are the default values
Singleband grayBand 1Black to white
108.622290.88Stretch to MinMaxFirst, try changing the Min/Max values under Band rendering to 199 and 200, respectively. Click “Apply” at the bottom of the Layer Properties menu to see the changes in the Map view.
In this example, we have essentially set all pixels with an elevation of 199 or less to black and pixels with an elevation of 200 or greater to white. This allows you to quickly see the contour lines of a given elevation and splits color on the screen in half.
Try changing the min/max value pairs to 149 and 150, respectively, and click “Apply.” Notice that the dividing line between white and black has shifted down in elevation.
Now try a min/max value pair of 249 and 250, respectively. Notice that the dividing line between white and black has shifted up in elevation.
Leave the settings the same as previous and try changing the Min/Max values under Band rendering to 90 and 300, respectively and change the Contrast enhancement to “Clip to MinMax” and click “Apply” at the bottom of the Layer Properties menu.
In this example, we have washed out the details of the landscape with an elevation between 90 and 300.
Try adjusting the min/max values a little at a time and click “Apply” each time to see how the visualization changes.
To add color, check the box next to “Colorize” under Color rendering. Click the color button to open the “Select color” menu. Click OK to close the “Select color” menu. You can also adjust the Strength bar to emphasize more/less the selected color.
When you are done, uncheck the box next to “Colorize” under Color rendering.
Change the Render type to “Singleband pseudocolor.” Leave the Interpolation method to “Linear.” The linear color ramp will stretch colors such that each unique pixel value has a unique color.
Next to Color, select a color ramp from the drop-down selection. You will notice that Values, Colors, and Labels will automatically be added to the white box area below.
Click “Apply” to see your color ramp applied to the elevation data.
Scroll down a bit to see the Mode selection, which should currently be set to “Continuous.” Change the Mode to “Equal interval” and the Classes selection becomes active. Change the number of classes and click “Apply” to see how this value affects the color ramp.
Keep the same setting as previous and try changing the Interpolation method to “Discrete.” Rather than having one unique color associated with each pixel value, groups of pixels are given one color if their value is within a defined band. You may change the band values either by directly clicking on them in the white box area and typing a new value or changing the number of classes (the Mode must be either Equal interval or Quantile to edit the number of classes).
Just like on a topographic map, we can draw lines of equal elevation over our raster image. This provides us with a new canvas to create visualizations.
In QGIS, click on “Raster” in the menu bar and come down to “Extraction” and click on “Contour…” to open the Contour tool menu (see Figure 5).
Figure 5. Contour extraction tool menu.
In the Contour menu, the input raster should be the default raster image we have in our map (e.g., w001001).
In the selection box for “Output file for contour lines (vector),” click on “Select…” button to open the output file selection menu. I recommend creating a folder to save vector output files (because they are made of lots of individual files). Name the output something meaningful (e.g., contours_20.shp).
In the number selection box next to “Interval between contour lines,” change the default value from 10 to 20.
Make certain you check the box next to “Attribute name” to save the actual elevation (ELEV) values with our contour lines (we will use this to create visualizations later).
Click “OK” to begin processing the contour lines.
A new layer should be added to our map when the process finishes. Click “OK” on the new popup windows.
Back at the Contour menu, you may re-run the tool for several different contour line intervals (e.g., 40, 60, 80); make sure you save the outputs under new file names (e.g., contours_40.shp, contours_60.shp, contours_80.shp).
When you are finished creating contours, click “Close” on the Contour tool menu to exit.
You will notice that for each contour line you created, a new layer will appear in the Layers Panel.
Double-click on one of the newly created contour layers to open its properties window. From the menu options on the left, select “Style” (if not already selected).
Notice at the very top of the properties window under Style, it says “Single symbol.” This means that every contour line will be styled in the same manner.
Below this, you will see the words “Line” and “Simple line.” Click on “Simple line” and you will open the options for changing the line color, width, pen style, cap style, etc.
Let’s say that you would like to have a different color to show the change in elevation.
Back at the top, click “Single symbol” to open the drop-down menu and select the option called “Graduated.” To show graduated colors there are two things you must do:
Below is an option box called “Column.” Click the down arrow and you will given two options: ID and ELEV. Select the second option. This will change the line colors based on the elevation of each contour line.
In the menu below, there is now a button for “Symbol” where you can adjust the line style.
Below that there is an option for the “Color ramp” where you can select how the colors change from high to low elevation.
Below that is the option for classes. Click the “Classify” button to assign colors to ranges of elevation. You may adjust the number of classes, add or remove classes, or edit class range values.
To create a stereolithography (STL) file, which is used by most modern 3D printers, we will go through the process of first transforming the raster data we downloaded into a digital elevation model (DEM) and then converting the DEM to STL format using DEMto3D QGIS plugin.
To convert our ESRI grid file into a plain text DEM, click on Raster in the Menu bar, go down to “Conversion” and select “Translate (convert format)…” to open the Translate tool menu.
Make certain our raster layer (w001001) is shown as the input layer. Click “Select…” next to “Output file” and navigate to a folder to save the output DEM. In the output file menu, give the output file a meaningful name (e.g., mville.dem)—note the “.dem” file extension that was given.
You may leave all other boxes unticked. Click “OK” to run the tool.
DiBiase, David. 2018. The Nature of Geographic Information. University Park, PA: Penn State’s College of Earth; Mineral Sciences. https://www.e-education.psu.edu/natureofgeoinfo/.
To the extent possible under law,
Tyler W. Davis
has waived all copyright and related or neighboring rights to
New Innovations Within Art & Science.
This work is published from:
United States.