How To: Estimate and build histograms for large raster datasets in ArcMap


Symbolizing a single-band raster using the Classified method requires a histogram to be built on the raster dataset. However, for a large-sized raster that has small cell sizes, for example, 30 x 30 cells, building a histogram for the entire raster dataset can be time-consuming.

The example below is a normalized difference vegetation index (NDVI) layer with the pixel size of approximately 3.28 feet. To symbolize the NDVI layer using the Classified method, a histogram must be built. However, given the fine resolution and large spatial extent, scanning through all the pixel values of the original large raster dataset to calculate histogram may take a significant amount of time. Hence, a quicker way to estimate and build the histogram is to resample the raster to a raster with reduced sampling size, build the histogram on the resampled raster, and import the histogram to the original raster.

Using the resampling technique, the resampled raster does not represent the original data distribution completely. 
However, this method is a way to approximate the original distribution with a smaller sample size to estimate the histogram more quickly.


The steps provided describe how to resample a large raster to a reduced resolution raster using the Resample Function, import the resampled raster's histogram to the original raster dataset using the Statistics and Histograms Function, and symbolizing the raster layer with Classified symbology.

  1. On the ArcMap main menu, click Windows > Image Analysis.
  2. In the Image Analysis window, enable and select the original raster.
  3. Click the Add Function button to open the Function Template Editor.
An image of enabling and selecting the raser layer in the Image Analysis window.
  1. Add and apply the Resample Function by the following the steps:
    1. In the Function Template Editor, right-click Identity Function > Insert Function > Resample Function.
An image of the Function Template Editor.
  1. In the Raster Function Properties dialog box, set the original pixel size for Input cell size, and a larger pixel size for Output cell size to reduce the resolution of the output raster.
An image of the Raster Function Properties dialog.
  1. Click OK to apply the function. This step generates a new layer that is a resampled raster with coarser spatial resolution.
  1. Right-click the new layer in the Table Of Contents > Properties to open the Layer Properties dialog box.
  2. Click the Symbology tab > Classified > OK.
  3. Click Yes on the Compute Histogram warning pop-up window.
An image of the Compute Histogram dialog box.
  1. Save the resampled raster layer with histogram built as a layer file by right-clicking the layer > Save As Layer File.
An image of saving as layer file.
  1. Open the Image Analysis window and add the Statistics and Histogram Function by the following steps:
    1. In the Image Analysis window, select the original raster dataset > Add Function.
    2. Right-click Identity Function > Insert Function > Statistics and Histogram Function.
An image of adding the Statistics and Histogram Function in ArcMap.
  1. In the Raster Function Properties dialog box, for the  Import Statistics and Histogram from File option, browse to the layer file saved in Step 8, and click OK.
  2. Click OK in the Function Template Editor to apply the function.
To view the imported histogram and symbolize the layer using the Classified method, open the Symbology window of the new layer generated in Step 9.
An image showing the histogram is added to the layer and can be symbolized using the Classified method.

Related Information