Creating contours using ArcMap/ArcScene

Digital elevation models (DEMs) are geospatial datasets that contain elevation values sampled according to a regularly spaced rectangular grid. They can be used in terrain analysis, 3D visualizations, and hydrological modelling, among other applications. DEMs can be stored in several different formats; however, conversion into a raster dataset is often required for many processes. This tutorial explains how to derive contours from DEMs using ArcMap and ArcScene.

To download a DEM file from GeoGratis as was done in this tutorial, follow the instructions in this guide. [UPDATE LINK]

You may also find these related guides helpful as you work with DEM files: [UPDATE LINKS]

  • Working with digital elevation models in ArcGIS
  • Selecting the right projection
  • Projecting data

Creating contours using ArcMap

  1. Open your DEM file. You can do this by clicking the Add Data button Screenshot of the Add Data button in ArcMap. and selecting the file you downloaded from GeoGratis. You may find it helpful to ensure that the file is accurately projected and georeferenced – this can be done by adding a basemap. Click on the small black arrow beside the Add Data button to open the drop-down menu, then select Add Basemap. This is a representation of elevation in the Calgary area. The DEM file is in black and white laid over a route map of Alberta with topographic information on it. Depending on the area covered by your DEM, certain basemaps may be better suited than others. For DEMs, any basemap which shows elevation will be a good choice. For this example we used the basemap titled “Streets.”
    Screenshot highlighting the location of the Add Data button in ArcMap, and showing the DEM file on top of a basemap.

    Troubleshooting Tips:
    If you are not able to find your folder while trying to add data, you may need to establish a new folder connection. You can do this by clicking the Connect to Folder button Screenshot of the Connect to Folder icon in ArcMap. on the Add Data window and then navigating to your folder.

  2. Raster files, such as DEMs, are not projected when added to ArcMap, so you will need to set the projection before generating contours. Right click on Layers and then select Properties from the drop-down menu.
    Screenshot showing where to select Properties from the drop-down menu.

  3. Within the Data Frame Properties window select the Coordinate System tab to ensure the correct coordinate system is selected. Most DEMs will have metadata that tells you which coordinate system to use. The Geogratis website outputs in NAD 1983 and Calgary is in zone 12N; therefore, this DEM is projected in NAD 1983 UTM Zone 12N. 
    Screenshot highlighting the Coordinate System tab, the correct coordinate system selection, and where the selected system is displayed.
     

    Troubleshooting Tips:
    If a different coordinate system is listed, you can select the correct one by navigating the folders: Projected Coordinate Systems > UTM > NAD 1983 > NAD 1983 UTM Zone 12N.

  4. In order to create contours, you will need to enable the Spatial Analyst toolbar, which can be found by going to Customize > Toolbars > Spatial Analyst.
    Screenshot highlighting the location of the Spatial Analyst toolbar selection in the Toolbars drop-down menu.

  5. Open the search bar. You can do this by clicking Windows > Search, or by clicking on the search icon Screenshot of the Search icon in ArcMap..
    Screenshot highlighting the location of Search on the Windows drop-down menu.

  6. In the search bar type Contour, and select Contour (Spatial Analyst) from the search results list.
    Screenshot showing where to search for Contour and highlighting the desired search result.

  7. After choosing Contour, a dialogue window will appear, prompting you for five settings:
    Input raster: select the DEM file from which you want to generate contours by locating it on your hard drive or in the dropdown menu, showing layers present in the Table of Contents
    Output polyline features: indicate where you want to save your output contours
    Contour interval: set the distance between contour lines in metres – the smaller the number, the greater the number of lines
    Base contour (optional): the starting point from which the lines are generated – for example, the default is 0 so with an interval of 25 metres, the contours are generated at 25, 50, 75, 100…, but if the base contour is set at 40, then the contours are generated at 65, 90, 115, 140 and so on
    Z factor (optional): can be used to adjust the units of data; for example, if you have data in metres and you want to produce your contours in feet, use a z-factor of 3.28 because 3.28 feet equals one metre
    Screenshot showing the appropriate field inputs in the Contour window.

  8. The generated contours will automatically be added to the map.
    Screenshot showing the generated contours, and highlighting the contour layer which has been added to the Table of Contents.
     

    Troubleshooting Tips:
    Try experimenting with different contour intervals to find the one that works best for your needs. Always be sure to include the contour interval in filenames and any description of the image or polylines. The choice of contour interval is one that is informed by 1) how you will use the contours, 2) changes in elevation within the extent of the DEM, 3) input resolution of the DEM, and 4) storage capacity on your computer.

 Creating 3D contours using ArcScene

  1. Open your DEM file. This is a representation of elevation in the Calgary area. You can do this by clicking the Add Data button Screenshot of the Add Data button in ArcScene. and selecting the file you downloaded from GeoGratis.
    Screenshot showing the DEM file opened in ArcScene, and highlighting the location of the Add Data button.

    Troubleshooting Tips:
    If you are not able to find your folder while trying to add data, you may need to establish a new folder connection. You can do this by clicking the Connect to Folder button Screenshot of the Connect to Folder icon in ArcScene. on the Add Data window and then navigating to your folder. 

  2. Raster files, such as DEMs, are not projected when added to ArcScene, so you will need to set the projection before generating contours. Right click on Scene Layers and select Scene Properties.
    Screenshot highlighting where to select Scene Properties from the drop-down menu.

  3. In the Scene Properties window select the Coordinate System tab, then select the correct coordinate system. Most DEMs will have metadata that tells you which coordinate system to use. The GeoGratis website outputs in NAD 1983 CSRS, so select it by navigating the folders: Geographic Coordinate Systems > North America > NAD 1983 (CSRS).
    Screenshot highlighting the Coordinate System tab in the Scene Properties window, as well as the correct coordinate system selection.

  4. In order to create contours, you will need to enable the 3D Analyst toolbar. You can find this by clicking Customize > Toolbars > 3D Analyst.
    Screenshot highlighting the location of the 3D Analyst toolbar in the Toolbars menu.

  5. Go to Layer Properties by right-clicking on the DEM layer and selecting Properties. Then, choose the Base Heights tab and under Elevation from surfaces select Floating on a custom surface. Select the DEM layer from the dropdown menu. This will not create a 3D DEM, but it will prepare the DEM for the next step.
    Screenshot highlighting the Base Heights tab, the correct elevation selection, and the arrow used to view the drop-down menu.

  6. Now, go to Scene Properties by right-clicking on Scene layers and selecting Scene Properties. Under the general tab, click the Calculate From Extent button next to Vertical Exaggeration. This will now raise the DEM into a 3D file.
    Screenshot highlighting the location of the General tab, as well as the Calculate From Extent button in the Scene Properties window.

  7. Your DEM should now look similar to this:
    Screenshot showing the 3D DEM file.

  8. Open the search bar. You can do this by clicking Windows > Search, or by clicking on the search icon Screenshot of the Search icon in ArcScene..
    Screenshot highlighting the location of the Search icon, as well as where to select Search from the Windows tab.

  9. Use the search bar to look for Contour, and select Contour (3D Analyst).
    Screenshot showing "Contour" in the search bar, and highlighting the correct search result.

  10. After choosing Contour, a dialogue window will appear, prompting you for five settings:
    Input raster: select the DEM file from which you want to generate contours by locating it on your hard drive or in the dropdown menu, showing layers present in the Table of Contents
    Output polyline features: indicate where you want to save your output contours
    Contour interval: set the distance between contour lines in metres – the smaller the number, the greater the number of lines
    Base contour (optional): the starting point from which the lines are generated – for example, the default is 0 so with an interval of 25 metres, the contours are generated at 25, 50, 75, 100…, but if the base contour is set at 40, then the contours are generated at 65, 90, 115, 140 and so on
    Z factor (optional): can be used to adjust the units of data; for example, if you have data in metres and you want to produce your contours in feet, use a z-factor of 3.28 because 3.28 feet equals one metre
    Screenshot showing the field inputs in the Contour window.

  11. The generated contours will automatically be added to the map. They will be 2D, and can be seen beneath the 3D DEM file.
    Screenshot showing the generated contours which have been added to the map beneath the 3D DEM file.

  12. You can change the contours to 3D in the same way as the DEM file in step 5. Right click on the contours layer in the Table of Contents, and select Properties. Then, choose the Base Heights tab and under Elevation from surfaces select Floating on a custom surface. Select the DEM layer from the dropdown menu.
    Screenshot highlighting the Base Heights tab, the elevation selection, and the button to open the drop-down menu.

  13. You will now have 3D contours.
    Screenshot showing the 3D contours.

Data format: 
Utilities: