HOW TO
The instructions provided describe how to remove and replace no data values within a raster using statistical information from the surrounding data values. The following Raster Calculator expression uses a conditional statement and focal statistics to replace no data values within a raster with a value statistically derived from neighboring cell values. This is useful for removing gaps of no data from merged or mosaicked rasters, and for rasters that need to be exported for use in software that does not recognize assigned no data values.
Note: This article applies to retired ArcGIS versions 8.x, 9.x and 10.0. Later versions of ArcGIS may contain different functionality, as well as different names and locations for menus, commands and geoprocessing tools.
For versions 8.x and 9.x
CON(isnull([raster]), FOCALMEAN([raster], rectangle,5,5), [raster])
Note: The size of the rectangle in the FOCALMEAN request can be edited to meet the needs of the data. Edit the "5,5" values to change the size of the rectangle. This may need to be smaller or larger, depending on the data.
For version 10.0
Con(IsNull("raster"), FocalStatistics("raster", NbrRectangle(5,5, "CELL"), "MEAN"), "raster")
Note: The size of the rectangle in the FocalStatistics request can be edited to meet the needs of the data. Edit the "5,5" variable to change the size of the rectangle. This may need to be smaller or larger, depending on the data.
Get help from ArcGIS experts
Download the Esri Support App