English

How To: Clip or extract the area of a raster image using polygon features

Summary

In some cases, users want to clip out the portions of a raster that fall inside a dataset containing polygon features, and keep only the areas around the polygons.

Raster with a polygon feature.

The instructions provided describe how to clip or extract a raster outside polygon boundaries.

Procedure

Use the Extract by Polygon tool
Note:
The Extract by Polygon tool requires a Spatial Analyst license.

The Extract by Polygon tool has an extraction area parameter with an outside option which allows cells outside the input polygon to be selected and written to the output raster. All cells inside the polygon receive NoData values on the output raster. However, this tool does not allow the use of an existing polygon feature class for the input polygon. This tool requires the vertices to be entered manually, and is therefore not suitable for erasing more complex geometries.

For more information on the Extract by Polygon tool, refer to the following ArcGIS Web Help page: Extract by Polygon.

Use the Image Analysis window to apply a Clip function to the raster
  1. In ArcMap, click the Windows menu, and open the Image Analysis window.
  2. With the correct raster selected in the top portion of the Image Analysis window, click the Add Function button in the Processing section.
  3. Right-click Identity Function > Insert Function > Clip Function. This opens the Raster Function Properties window.
  4. Change Type to Inside.
  5. In the Clip section, under Clipping Geometry/Raster, browse to the desired polygon features, and check the Use Input Features for Clipping Geometry check box.
  6. Click OK > OK.
  7. Export the raster to save it permanently. 
Use the Erase and Extract by Mask tools
Note:
The Erase tool requires an ArcGIS Desktop Advanced license and the Extract by Mask tool requires a Spatial Analyst license.
  1. After a polygon feature is created on a raster, create a new feature class of a rectangular polygon that covers the entire extent of the raster.
A rectangular feature covering the entire raster.
  1. Use the Erase tool to erase the polygon features from the rectangular polygon.
Rectangular feature with a donut hole of the polygon feature.
  1. Use the output from Step 2 as the Input raster or feature mask data parameter in the Extract by Mask tool.
Note:
In some cases, the extracted raster does not display properly because of the Stretch function applied to the raster. If this occurs, open the Layer Properties dialog box of the extracted raster > Symbology tab. In the RGB Composite renderer, change the Statistics drop-down list to From The Current Display Extent.

For more information on the Erase and Extract by Mask tools, refer to the following ArcGIS Web Help pages: Erase and Extract by Mask.

Extracted raster

Related Information