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.
- Acquire vector data that represents water body features, or manually digitize water bodies with assistance of high resolution imagery.
- 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.
- Run the Polygon to Raster tool to convert the water body polygon layer into raster layer.
- In the Catalog window, navigate to System Toolboxes > Conversion Tools > To Raster > Polygon to Raster.
- Select the polygon layer as Input Features.
- Select the new field from Step 2 as Value field.
- Specify the location and name for Output Raster Dataset.
- Select the elevation raster as Cellsize to assign the same pixel size.
- Click OK.
- 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.
- Navigate to System Toolboxes > Data Management Tools > Raster > Raster Dataset > Mosaic To New Raster.
- Select the water body raster and elevation raster as Input Rasters.
Note: 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.
- Specify the Output Location for the output raster.
- Specify the Raster Dataset Name with Extension.
- Specify the value for the Number of Bands.
- Click OK.
- Run the Contour tool to generate contour for the raster generated from Step 4.
Note: The Contour tool requires a 3D Analyst or Spatial Analyst license.
- Navigate to System Toolboxes > 3D Analyst > Raster Surface > Contour.
- Select a layer as Input raster.
- Specify the location and name for Output polyline features.
- Set a value for Contour Interval.
- Click OK.
- ArcGIS Help: Add Field (Data Management)
- ArcGIS Help: Calculate Field (Data Management)
- ArcGIS Help: Polygon to Raster (Conversion)
- ArcGIS Help: Mosaic to New Raster (Data Management)
- ArcGIS Help: Contour (Spatial Analyst)