How To: Modify elevation an surface to avoid generating contours running across water body surfaces


Generating contours from elevation rasters may result in contours running across water body surfaces, which does not happen in reality because a water body surface is flat. Elevation raster pixel values do not reflect the flat surface of a water body, as the pixel values in the elevation raster vary. Therefore, when generating contours from an elevation layer, the contours may run across water body.

These instructions describe how to avoid generating contours that run across a water body surface by modifying the elevation raster pixel values to a uniform value.


  1. Acquire vector data that represents water body features, or manually digitize water bodies with assistance of high resolution imagery.
  2. Add a new field to the polygon layer of water bodies, and assign a value of 0 to the new field using the Field Calculator for all water body features.
  3. Run the Polygon to Raster tool to convert the water body polygon layer into raster layer.
    1. In the Catalog window, navigate to System Toolboxes > Conversion Tools > To Raster > Polygon to Raster.
    2. Select the polygon layer as Input Features.
    3. Select the new field from Step 2 as Value field.
    4. Specify the location and name for Output Raster Dataset.
    5. Select the elevation raster as Cellsize to assign the same pixel size.
    6. Click OK.
  4. Run the Mosaic to New Raster (Data Management) tool to mosaic the elevation raster and the water body raster generated from Step 3 to a new raster.
    1. Navigate to System Toolboxes > Data Management Tools > Raster > Raster Dataset > Mosaic To New Raster.
    2. Select the water body raster and elevation raster as Input Rasters.
    Put the water body raster on top of the list and select Mosaic Operator to FIRST. The value 0 from the water body raster will overwrite the pixel value of the elevation raster in the output raster mosaic.
    1. Specify the Output Location for the output raster.
    2. Specify the Raster Dataset Name with Extension.
    3. Specify the value for the Number of Bands.
    4. Click OK.
  5. Run the Contour tool to generate contour for the raster generated from Step 4.
    The Contour tool requires a 3D Analyst or Spatial Analyst license.
    1. Navigate to System Toolboxes > 3D Analyst > Raster Surface > Contour.
    2. Select a layer as Input raster.
    3. Specify the location and name for Output polyline features.
    4. Set a value for Contour Interval.
    5. Click OK.

Related Information