Select to view content in your preferred language

Cannot get the Calculate Statistics "ignore_values" option to work

1266
3
04-08-2011 12:22 PM
MartinWong
Emerging Contributor
I'm trying to run Calculate Statistics with an ignore value of -9999 on a single-band 16-bit signed integer file geodatabase raster with valid values ranging from 0-581 and a "nodata" value of -9999.  After I do this, the resulting statistics values still shows

Min -9999
Max 581
Mean -1783.185719373219
Std dev. 4290.54031147985

This causes the default contrast stretch in ArcMap to draw the valid pixels as solid white.  I can manually adjust the stretch type to Minimum-Maximum and edit the low value so that it draws correctly.  The problem is that I have hundreds of multiband images all with different value ranges.

I thought the problem was because my original image was a 32-bit floating point raster, so I did a Copy Raster to a 16-bit signed integer output type but I'm still having the same problem.  I've also tried doing a Clean Statistics an rerunning the Build Stats.

Is this a bug or am I doing something wrong?  I've done searches for similar problems and only came up with this closed thread from Jan 2009:
http://forums.esri.com/Thread.asp?c=93&f=985&t=253386
0 Kudos
3 Replies
MartinWong
Emerging Contributor
Well, it appears that this does work on a .tif copy of my image, so apparently it's only my file geodatabase grids that the "ignore_values" won't work on.  I can reprocess my images to TIFFs, but it would still be helpful to know if I'm doing something wrong or if I should submit a bug.
0 Kudos
ChrisBater
Deactivated User
I'm having the same problem with 32 bit floating point geotiffs. The NoData value as listed in the raster properties as -3.40282346639e+038; however, I want to calculate statistics while ignoring values of -999. It doesn't work.
0 Kudos
Waan
by
Regular Contributor
Hi

I'm having a similar problem.  Another program (Petrosys) exports .bil raster we would like to view and manipulate in ArcMap.  When we generate statistics and/or a histogram, we get the same problem as you, i.e. the NoData values are included in the statistics despite the .hdr file explicitly specifying "1e+019 = NoData".  (Perhaps ArcGIS cannot pick up on the "1e+019" and is instead looking for "10000000000000000000" in the .hdr??) 

I have two possible workarounds:

1) Before generating statistics and/or a histogram, check off the "Apply Gamma Stretch" option using the "From Current Display Extent" under the Statistics dropdown.  This obviously wouldn't work for a batch operation.

or

2) Dump your raster in to a different format (in my case, in to a GDB; in Martin's case, in to .tiff).  This seems to regenerate stastics correctly.

Users: if you can, check out the .stx and/or the .hdr files (open with text editor) to see how the NoData value is defined (I suppose this wouldn't work in a GDB).  I'm wondering if Arc needs a number explicitly defined in the header, as opposed to scientific notation, as I suggested in parentheses above ... best guess so far.

I'd guess this is a bug of some sort?  ESRI, any ideas why the statistics-generation tool seems to be touchy to NoData values?  How does it go about generating statistics?
0 Kudos