Select to view content in your preferred language

Setting "-9999" as a 'NoData' Value (Changes Minimum Value)

1117
5
04-12-2011 09:51 AM
KylePurdon
Emerging Contributor
Hello,

We have a raster dataset of sub-glacial elevation that is masked out to a non-regular extent for accuracy reasons. However the modelers want a regular mask around the data so we created one using NoData values of -9999. However doing this sets the new minimum value of the raster obviously to -9999. Is there a way to tell Arc that -9999 is the "NoData" value? Or should we actually use the "SetNull" command to set the cells to the value "NoData" or would this create issues in doing calculations/merges/etc... with the rasters?

Thanks!
0 Kudos
5 Replies
curtvprice
MVP Alum
It is best to use NoData to represent NoData. Any raster operations you do should handle NoData correctly and your statistics will not include the NoData areas. So, yes, use SetNull to set your -9999 cells to NoData and use that grid for the mask, extent and snap raster for future operations.

If you want to dump the raster out for use outside ArcGIS, you can either convert the NoData using the IsNull function to a value, or the conversion too (Grid To Ascii) often allows you to specify a value for NoData cells.
0 Kudos
KylePurdon
Emerging Contributor
We actually post this data as we are part of a NSF funded research group and share our results with researchers and the public so having an actual 'NoData" value thats a number is a must. However I guess we will just have to have an in-house version of our grids that use the 'NoData' value.

Thanks!
0 Kudos
AndyRoberts
Emerging Contributor
I was excited to see this thread but it doesn't quite address my own problem. I use SetNull (in Raster Calculator) to change -9999 values to NoData but this process also changes the minimum value of my "real" data in the resulting raster. E.g., input raster has 153.78 as a minimum value, but after I execute SetNull("mm95_2011_normals.tif"   <= -9999 ,"mm95_2011_normals.tif") the output raster has a minimum value of 162.38. I cannot find the missing / changed cells anywhere. This has happened multiple times. Any ideas?   Thanks.
0 Kudos
KylePurdon
Emerging Contributor
No ideas off the top of my head, but i'd be glad to take a more in-depth look if you can share your data.
0 Kudos
AndyRoberts
Emerging Contributor
Yes, thanks! Send me your e-mail off-list and I'll point you to the files. I have replicated the problem using different raster formats (.tif, GRID) with the same results - can't figure where the cells are getting changed.

For the record, in Layer Properties / Symbology / Classify the number of cells listed in the Count: value in the Classification Statistics box are the same for the original raster when I have an exclusion of -9999 and the SetNull == -9999 result. When I remove the exclusion, the cell count in that layer bumps up to the product of the rows x columns of the whole extent. So, it looks like I'm not losing cells but rather the values are getting changed.

Andy (roberts@vt.edu)
0 Kudos