HOW TO

Modify an elevation surface to avoid generating contours across water body surfaces in ArcGIS Pro

Last Published: August 15, 2023

Summary

When elevation values across water body surfaces are not uniform in an elevation raster, contour lines generated from the elevation raster can run across the water body surfaces.

Contour lines that do not run across water body surfaces can be created in ArcGIS Pro by modifying the pixel values of the water bodies on the elevation surface to a uniform base value. For example, this can be useful for studying the contours of a mountain range without lines on the surfaces of lakes, which are flat.

This article provides the workflow to modify an elevation surface to avoid generating contours running across water body surfaces. The image below shows an elevation raster of a mountain range with contour lines on the surface of lakes.

Contours generated across water body features on an elevation surface

Procedure

  1. Open the ArcGIS Pro project and add vector data representing water body features. In this example, polygons representing the lakes in the elevation raster are added to the map.
The elevation raster and polygon layers on the map
  1. Create a new field in the water body features polygon layer with a value of zero.
Note:
A value of zero refers to the base level of measuring elevation, also known as sea level.
  1. Right-click the polygon layer in the Contents pane, and select Attribute Table.
  2. In the attribute table, click Add Field and specify a name for Field Name. In this example, the field name is ‘Surface’.
Naming the new field of the polygon layer
  1. Click Save on the top ribbon.
  2. In the attribute table, right-click the newly created field, and click Calculate Field to open the Calculate Field window.
  3. Type ‘0’ in the expression box and click OK.
Entering a value of 0 for all values in the new field using the Calculate Field tool
The image below shows a value of zero assigned to the new field for all water body features.
The new field is populated with values of 0
  1. Use the Polygon to Raster tool to convert the water body features polygon layer to a raster layer.
    1. On the ribbon, click Analysis > Tools.
    2. In the Geoprocessing pane, search for and select Polygon to Raster (Conversion Tools).
    3. Select the polygon layer for Input Features.
    4. Select the new field from Step 2 for Value field.
    5. Specify the location and name for Output Raster Dataset.
    6. Select the elevation raster for Cellsize to assign the same pixel size, and click Run.
Configuring the parameters of the Polygon to Raster tool
The image below shows the raster layer of the water body features on the map.
The output raster layer of the water bodies on the map
  1. Use the Mosaic To New Raster tool to combine the water body raster and the elevation raster layers into a new raster.
    1. In the Geoprocessing pane, search for and select Mosaic To New Raster (Data Management Tools).
    2. For Input Rasters, select the elevation raster layer first and the water body raster second.
    3. Specify a location for Output Location.
    4. Specify a name for Raster Dataset Name with Extension.
    5. Optionally, select a bit depth for Pixel Type.
    6. Specify a band number for Number of Bands.
Note:
Right-click the elevation layer in the Contents pane, and click Properties > Source > Band Metadata to view the number of bands in the layer.
  1. Ensure Mosaic Operator is set to Last for the output cell value of the overlapping areas to be the value from the last raster dataset mosaicked into the location. In this example, the last raster is the water body raster.
  2. Click Run.
Configuring the Mosaic To New Raster tool parameters
The image below shows the combined raster added to the map.
The output combined raster on the map
  1. Use the Contour tool to create contour lines for the combined raster from Step 4.

The image below shows a comparison of the contour lines before and after modifying the elevation surface.

A comparison of the contour lines before and after modifying the elevation surface
Note:
The contour lines around water body surfaces can be manually deleted. Optionally, increase the value of contour intervals in the Contour tool to decrease the number of contour lines around water body surfaces.

Article ID: 000030912

Software:
  • ArcGIS Pro 3 1
  • ArcGIS Pro 3 0
  • ArcGIS Pro 2 9x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options