Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 73

DEM Terrain Analysis: Slope, Aspect, and Hillshade

Recommended resources

Hello! Welcome back to our module on Applied Spatial Analysis.

In our last lesson, we established a solid understanding of the Digital Elevation Model (DEM), exploring what it is, the crucial difference between a DTM and a DSM, and how this elevation data is captured and visualized. You learned that a DEM is much more than just a pretty picture of a landscape; it's a powerful dataset containing raw elevation information.

Today, we will unlock that power. Our learning outcome is to generate and interpret terrain analysis outputs (slope, aspect, and hillshade) from a DEM. We will move from simply looking at a DEM to analyzing it to extract fundamental characteristics of the Earth's surface. These three outputs—slope, aspect, and hillshade—are the building blocks for countless applications in physical geography, from hydrology to climatology and geomorphology.

1. The Engine of Terrain Analysis: The Moving Window

Before we create our first output, it's helpful to understand how a GIS calculates these new values from a DEM. Most terrain analysis tools work by using a concept called a neighborhood analysis or a 3x3 moving window.

Imagine a 3x3 grid of pixels (a "window") that moves across your entire DEM, one cell at a time. For each position, the GIS looks at the elevation value of the center cell and the values of its eight immediate neighbors. It then performs a calculation using these nine values to determine the output value (e.g., the slope) for that center cell. This process is repeated for every cell in the DEM, creating a brand new raster layer.

This simple but powerful method allows the software to assess the local topography at every single point on the map.


2. Hillshade: Visualizing the Terrain

We'll start with hillshade because it's the most intuitive output. You saw a preview of it in our last lesson. A hillshade creates a realistic, three-dimensional representation of the terrain by simulating how sunlight and shadows would fall across the landscape.

8.4: Surface Analysis- Terrain Mapping

For a clear definition, let's turn to the Geo LibreTexts resource. This section explains what a hillshade map represents and the inputs used to create it.

Please read the short paragraph titled 'Hillshade map'. Focus on its purpose (visualizing the 3D nature of land) and the inputs required, such as the angle of the incoming light.

As you read, a hillshade is not a measure of a physical property of the land itself. Instead, it's a visualization technique. To create it, the GIS needs two key parameters:

  • Azimuth: The direction of the light source (the "sun") in degrees from 0-360. The default is typically 315° (from the northwest).
  • Altitude: The angle of the sun above the horizon, from 0-90 degrees. A common default is 45°.

The resulting map shows grayscale values from 0 (black, complete shadow) to 255 (white, direct illumination). This creates a shaded relief effect that makes ridges, valleys, and other landforms pop out. Its primary use is to provide a visually intuitive backdrop for other map layers.

To see how this is done in practice, let's watch a demonstration.

QGIS Terrain Analysis: hillshade, slope, aspect (Version 3.x)

This video from Geospatial School will walk you through creating a hillshade from a DEM using QGIS. It also demonstrates a very common and effective visualization technique.

Please watch from the beginning (00:00:20) to 04:47. The first part (to 03:28) shows the hillshade generation. The second part (from 03:28) shows how to overlay a colored DEM with transparency on top of the hillshade to create a rich, informative visual.


3. Slope: Measuring Steepness

While hillshade is for visualization, slope is our first true analytical product. A slope map quantifies the steepness or gradient at every single point on the terrain.

Introduction to basic GIS and spatial analysis using QGIS

The QGIS training manual provides a great, practical definition of slope and its measurement units.

Please read the section titled 'Slope' (page 97). Pay close attention to the two ways slope can be measured: degrees and percent.

As the reading explains, slope can be expressed in two main ways:

  • Degrees: An angle from 0° (completely flat) to 90° (a vertical cliff). This is intuitive for thinking about angles.
  • Percent: Calculated as (rise / run) * 100. A 45° slope is equal to a 100% slope (rise equals run). As the slope approaches vertical (90°), the percent slope approaches infinity.

The choice of unit depends on the application. For example, civil engineering standards often use percent slope for road grades.

A slope map is crucial for many analyses, including:

  • Hazard assessment: Identifying areas at risk for landslides or avalanches.
  • Hydrology: Modeling the velocity of water runoff.
  • Urban planning: Determining suitable locations for construction.

Let's see how a slope map is generated.

QGIS Terrain Analysis: hillshade, slope, aspect (Version 3.x)

Continuing with the same Geospatial School video, this next segment demonstrates how to generate a slope raster.

Watch from 04:47 to 08:56. The presenter generates the slope map and explains how to interpret the output by applying a color ramp, where red indicates steeper areas.


4. Aspect: Determining Direction

Our final core output is aspect. If slope tells us how steep a surface is, aspect tells us which direction that surface faces.

Introduction to basic GIS and spatial analysis using QGIS

Let's again consult the QGIS training manual for a clear definition of aspect.

Please read the section titled 'Aspect' (page 98). Focus on how the output values (0-360 degrees) correspond to compass directions.

The output of an aspect analysis is a raster where each cell's value is the direction its slope faces, measured in degrees from north:

  • 0° or 360°: North
  • 90°: East
  • 180°: South
  • 270°: West
  • A special value (like -1) is used for flat areas, which have no aspect.

Aspect is fundamentally important in physical geography, particularly in fields related to your interest in climatology:

  • Solar Insolation: In the Northern Hemisphere, south-facing slopes receive significantly more direct sunlight than north-facing slopes. This affects temperature, evaporation rates, and soil moisture.
  • Ecology: Different plant species are adapted to the specific light and moisture conditions found on slopes with different aspects.
  • Snowmelt: Aspect controls where snow persists longest into the spring and summer.

Now, let's see the aspect tool in action.

QGIS Terrain Analysis: hillshade, slope, aspect (Version 3.x)

This final clip from the Geospatial School video shows the generation of an aspect map and how to begin interpreting its directional values.

Watch from 08:56 to the end (12:26). Notice how different colors are used to represent the different compass directions the slopes are facing.


5. Bringing It All Together

The true power of GIS comes from being able to derive and visualize these different attributes of the landscape from a single DEM.

GIS Terrain Analysis Outputs: Slope, Aspect, Contour, and Hillshade
This image provides a fantastic summary. From a single elevation dataset, we can generate a **Slope** map (showing steepness), an **Aspect** map (showing direction), **Contour** lines (lines of equal elevation), and a **Hillshade** map (for 3D visualization). Each map tells a different story about the same terrain.
Test your understanding!

You are an ecologist studying a mountain range in the Northern Hemisphere. You need to find potential habitats for a rare plant that thrives in cool, moist, and relatively steep environments. Which terrain analysis outputs would you use, and what characteristics would you look for in those outputs?

Show answer

You would need to combine Slope and Aspect maps.

  1. Aspect: To find cool and moist environments, you would look for north-facing slopes. In the Northern Hemisphere, these slopes receive less direct solar radiation, making them cooler and retaining moisture longer. On an aspect map, you would query for cells with values around 0° or 360°.
  2. Slope: To find "relatively steep" environments, you would look for areas with high values on the slope map. The exact threshold for "steep" would depend on the plant's specific requirements, but you would filter for cells above a certain degree or percent slope.

By finding the areas where these two conditions overlap, you can identify the most promising habitats for the plant.


Conclusion

In this lesson, we have moved beyond simply viewing a DEM to actively analyzing it. You have learned how to generate and interpret three of the most fundamental terrain derivatives in GIS.

Key Takeaways:

  • Terrain analysis tools often use a 3x3 moving window to calculate values based on a cell's local neighborhood.
  • A Hillshade map simulates light and shadow to create a 3D visual effect, making terrain easier to interpret. It's defined by the sun's azimuth and altitude.
  • A Slope map quantifies the steepness of the terrain, usually in degrees or percent. It is essential for analyzing stability, runoff, and land suitability.
  • An Aspect map identifies the compass direction a slope faces, measured in degrees from 0-360. It is a critical factor for understanding microclimate, solar energy, and vegetation patterns.

Preview of the Next Lesson:

Now that you can derive these fundamental terrain attributes, you are ready for a more advanced application. In our next lesson, we will apply GIS tools to a practical problem: delineating a watershed from a DEM. This process, a cornerstone of hydrology, relies heavily on the slope and flow direction information that we can derive from an elevation model. You will see how these basic concepts build towards solving complex real-world geographic problems.