Zonal histogram seems to be stretching values

931
2
03-07-2013 12:51 AM
PriyamvadaTrivedi
New Contributor
The values of pixels in the original raster range from 0-63. However when I make a histogram (Zonal Histogram), using a shapefile as my input zones, I get a distribution of values from 0-255. Any idea how this is happening? How can I ensure that the values are from 0-63?

Any help would be appreciated.

Thank you.
0 Kudos
2 Replies
EricRice
Esri Regular Contributor
You're probably displaying the raster with a stretched renderer.  Switch it to unique values then run Zonal Histogram.

Usage Tip from tool documentation that I believe applies here:

  "In the histogram graph, the number of classes (bins) for each zone is determined by the Input value raster. 



  • If a layer is specified, then the layer's symbology defines the number of classes.

  •     If a dataset is specified,  by default there will be 256 classes,  unless the input is integer with less than 26 unique values, in which  case it will be the total count of unique values."

The graph is based on the table, so maybe we need to reword that a little.

Best,
Eric
0 Kudos
GuilhermeBraghirolli
New Contributor

I had the same issue and this solution solved it.

Is there any way of doing this inside the model builder? It automatically generates the histogram from 0 to 255. 

0 Kudos