HOW TO

Change a particular value of a raster dataset to zero without changing the other values in ArcGIS Pro

First Published: April 26, 2023
Last Published: June 25, 2026

Summary

During spatial analysis using raster data, it may be necessary to change a particular value in a raster without changing the other values to improve the display of the raster data. For example, the maximum cell value can be changed to zero while retaining the minimum cell value. While the Reclassify tool can be used to convert a certain value to zero, it can be inconvenient if the raster has a large range of values. Therefore, this task is simplified by using the Raster Calculator tool.

This article provides the workflow to change the value of the raster dataset below to zero without changing other values in ArcGIS Pro.

The range of values of a raster layer.

Procedure

  1. Open the ArcGIS Pro project.
  2. On the Analysis tab, in the Geoprocessing group, click Tools.
  3. In the Geoprocessing pane, search for and click the Raster Calculator tool.
  4. In the Raster Calculator pane, on the Parameters tab, enter the following Python syntax into the expression box. Replace <InRaster> with the name of the raster layer and <value> with the value of the raster layer.
Con("<InRaster>" == <value>, 0 , "<InRaster>")
  1. For the Output raster parameter, specify a name for the new layer.
  2. Click Run.
The configured parameters in the Raster Calculator pane.

The value of the raster layer is changed to zero (0), as shown below.

The value of the raster layer changed to zero.

Article ID: 000030146

Software:
  • ArcGIS Pro

Get support with AI

Resolve your issue quickly with the Esri Support AI Chatbot.

Start chatting now

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Start chatting now

Go to download options