## Golden Software Blog

Helping you learn more about the latest product information, tips, tricks, techniques, and customer stories so you can visualize data and communicate results with ease.
Font size: +

# Creating Terrain Slope Maps from Digital Elevation Models in Surfer

Creating a map of slopes is common practice when looking at slope stability. Some examples of when you may want to create slope maps would be to identify areas with high slope to indicate avalanche or landslide danger. Another example may be to present slope maps of the seabed so that a structure with set tolerances for inclination could be located. Slope and gradient maps can be easily generated using Surfer.

Slope information can be easily computed from grid, raster or digital elevation models (DEMs) using options under the Grid | Calculus menu command in Surfer. The slope values can be expressed either in degrees or as a decimal (rise/run) which can then be computed as a percentage. For example, using Grid | Calculus you could select:

1. Terrain Modeling | Terrain Slope. This option generates a grid file of the slopes expressed in degrees, from 0° (horizontal) to 90° (vertical). This is the most commonly used option to create a grid file of terrain slopes.
2. Differential and Integral Operators | Gradient Operator. This option generates a grid file of the slope or gradient expressed as a decimal ratio of rise over run, from zero (horizontal) to approaching infinity at vertical. To calculate slopes as a percentage (e.g. 15%) instead of a decimal, use Grid | Math to multiply the Gradient Operator results by 100.

Using a digital elevation model (or any grid file), create slope maps either by calculating terrain slope in degrees or the gradient of the slope in percent.

Let’s walk through an example. Let’s say we have an area that is prone to avalanches and we want to indicate on a map the areas where the slope is greater than 30°. To do this, follow these steps:

1. First, let’s create a map of the area
1. Click Map | New | 3D Surface Map, select LovelandPass_DryGulch.grd and click Open.
2. Let’s drape an aerial image over it. Click on the map to select it and click Map | Add | Base Layer, select LovelandPass.tif and click Open
3. Click Yes to adjust the limits.
4. You can change the properties of the 3D surface layer to see the draped image a little better.
1. Select the 3D Surface layer in the Object Manager.
2. In the Property Manager, click the General tab.
3. Click the  button to the right of Upper
4. In the Colormap dialog, set the Preset to GrayScale (at the top of the list)
5. Click the color node on the left side of the colormap and change the Color to White (so the colormap goes from white to white).
6. Click OK.
7. Click the Lighting tab and set the Vertical (degrees) light position to 80. This brightens the map up a bit.
5. Select Map in the Object Manager and in the Property Manager click the Scale tab.
6. In the Z Scale section, set the Map units per in. to 720.8333333, eliminating the vertical exaggeration.

Create a 3D surface map and drape a georeferenced image on top of it to visualize the DEM.

2. Now let’s calculate the grid of slope data, in degrees.
1. Click Grid | Calculus, select LovelandPass_DryGulch.grd and click Open.
2. Select Terrain Modeling | Terrain Slope.
3. Click the Change Filename button to the right of Output Grid File
4. Enter the name LovelandPass_DryGulch_Slope.grd and click Save.
5. Click OK and the grid is created.

Select the Terrain Modeling | Terrain Slope option in the Grid Calculus dialog.

3. Add contours of the slope data to the existing map. Click on the map to select it.
4. Click Map | Add | Contour Map, select LovelandPass_DryGulch_Slope.grd and click Open. Contours of the slope are added to the map.

Add slope contours to the 3D surface map

5. Now we can highlight the areas above 30 degrees, which indicate the zones of avalanche danger.
1. Select the Contours layer in the Object Manager.
2. In the Property Manager, click the Levels tab.
3. Set the Minimum contour level to 30.
4. Change the contour Interval to cover the entire range of values (e.g. 40). Now I can see on the map where the slope is greater than 30°.
5. Check the Fill contours check box to fill the contours.
6. Change the Level method to Advanced and click the Edit Levels button.
7. In the Levels for Map dialog:
1. Double click on the level button under the Fill column and set the fill to a solid red foreground color with 25% opacity. Click OK.
2. Double click on the level button under the Line column and set the line properties to the desired color, such as a red 0.010 inch line. Click OK.
3. Under the Label column, double click Yes to change it to No.
8. Click OK in the Levels for Map dialog to apply the changes.

Set the contour levels to visualize the areas that have a slope above a 30° angle.

Another way to visualize this data is to create a base map of a USGS DRG file showing the elevation contours, and overlaying that map with a contour layer of the slope data.

Additionally visualize the slope results on a 2D map of elevation contours. Print this map to take with you in the field.

Please note that when calculating slopes from DEM or grid files, Surfer uses the X, Y and Z values proportionally when calculating the slope values. Therefore, the X, Y and Z values must be in the same units, and the units must be linear (e.g. feet or meters) for the slope calculation to be correct.  If the X and Y units in the grid file are in lat/lon, then the slope calculated for each node will be almost vertical because the X and Y extents (the lat/lon ranges) are so small compared to the difference in Z values. In this case, convert the coordinate system of your data, DEM or grid file from lat/lon to another system with linear units prior to calculating the slope. For instructions on how convert the XY coordinates for raw data, DEMs, please see our newsletter article: .

Slope maps can be powerful tools when evaluating sites for safety, field engineering, projecting road layouts or drainage patterns, and many other applications. Surfer can also calculate other terrain modeling information, such as aspect and curvature to make sure you get the information you need to make informed decisions.

Other Resources:

Guest - Pedro on Friday, 28 June 2019 12:30

is it possible to visualize areas where the slope % is higher than 100%?

0
is it possible to visualize areas where the slope % is higher than 100%?
Guest - Kari Dickenson on Monday, 01 July 2019 08:40

Yes, it is possible to visualize areas where the slope is greater than 100%. A slope of 100% is where the vertical distance is the same as the horizontal distance (a 45° slope). To do this, click Grids | Calculate | Calculus. Select your input grid, choose Differential & Integral Operator | Gradient Operator, specify the output grid, choose to create a new contour map and click OK.

The Z value in this grid is rise/run. To convert it to a %, click Grids | Calculate | Math. In the Grid Math dialog, click Add Grids, select the new grid and click Open. Enter a function A*100 to multiple the Z values in the grid by 100 to convert them to a %.

Then to visualize the areas where Z is over 100%, create a contour map (Home | New Map | Contour Map, select the grid file and click Open). Select the Contours layer and in the Properties window, click the Levels tab, change the Minimum contour value to 100. You can change the Contour interval to something greater than the difference between the new contour minimum and contour maximum value to get a single interval for the area above 100%. You can then fill the contours if you wish or overlay it with other maps.

Thanks!
Kari

0
Yes, it is possible to visualize areas where the slope is greater than 100%. A slope of 100% is where the vertical distance is the same as the horizontal distance (a 45° slope). To do this, click [b]Grids | Calculate | Calculus[/b]. Select your input grid, choose [i]Differential & Integral Operator | Gradient Operator[/i], specify the output grid, choose to create a new contour map and click OK. The Z value in this grid is rise/run. To convert it to a %, click [b]Grids | Calculate | Math[/b]. In the [b]Grid Math[/b] dialog, click [i]Add Grids[/i], select the new grid and click [i]Open[/i]. Enter a function [i]A*100[/i] to multiple the Z values in the grid by 100 to convert them to a %. Then to visualize the areas where Z is over 100%, create a contour map ([b]Home | New Map | Contour Map[/b], select the grid file and click [i]Open[/i]). Select the [i]Contours[/i] layer and in the [b]Properties[/b] window, click the [b]Levels[/b] tab, change the [i]Minimum contour[/i] value to 100. You can change the [i]Contour interval[/i] to something greater than the difference between the new contour minimum and contour maximum value to get a single interval for the area above 100%. You can then fill the contours if you wish or overlay it with other maps. Thanks! Kari
Guest - Kari Dickenson on Monday, 01 July 2019 08:45

I wanted to add, for an example, see Surface3.srf in the Surfer Samples folder.

0
I wanted to add, for an example, see Surface3.srf in the Surfer Samples folder.
Guest - John on Tuesday, 27 March 2018 13:39

Hello Kari,

Your is really helpful create 3d surface for architectural modelling and rendering.
Is it possible export obj or fbx file format for 3d software ?

Best regard,
3d Motion Studio
https://www.3dmotion.info

0
Hello Kari, Your is really helpful create 3d surface for architectural modelling and rendering. Is it possible export obj or fbx file format for 3d software ? Best regard, 3d Motion Studio [url=https://www.3dmotion.info][/url]
Guest - John on Wednesday, 28 March 2018 12:16

Hello Justine,

Best regard,
3d Motion Studio
https://www.3dmotion.infohttps://www.3dmotion.info

0
Hello Justine, Thanks for your kind reply. Best regard, 3d Motion Studio https://www.3dmotion.info[url=https://www.3dmotion.info][/url]
Guest - Pieter-Jan Grabe on Friday, 02 September 2016 07:28

Articles vey helpful. I used terrain modelling to define possible alluvial deposit boundaries.

1
Articles vey helpful. I used terrain modelling to define possible alluvial deposit boundaries.
Guest - Tahir on Monday, 20 June 2016 04:49

Dear Sir,

Thanks For Sharing, Your Article Is Very Useful For Digital Modeling... I Gland This Topic...

3D Rendering Studio.
http://www.thecheesyanimation.com

0
Dear Sir, Thanks For Sharing, Your Article Is Very Useful For Digital Modeling... I Gland This Topic... 3D Rendering Studio. http://www.thecheesyanimation.com
Guest
Wednesday, 18 May 2022

### Most Popular

Over the years, one of the most common questions asked is “How can I get my contour map out of Surfe...
Creating a map of slopes is common practice when looking at slope stability. Some examples of when y...
I'm pleased to introduce our first ever guest blogger, Scott Carter, Owner and Creative Director of ...

Go to top