Knowledge Base - Technical Articles


Technical Article   HowTo:  Convert NoData values to other values for raster data

Article ID: 34932
Software:  ArcGIS - ArcEditor 9.2, 9.3, 9.3.1, 10 ArcGIS - ArcInfo 9.2, 9.3, 9.3.1, 10 ArcGIS - ArcView 9.2, 9.3, 9.3.1, 10
Platforms: N/A

Summary

Instructions provided describe how to assign the NoData cells of a raster to a specific value. Various spatial analysis applications require raster NoData cells to be factored into an analytical operation. Since NoData cells are ignored in any analysis, such requirements can only be met if those cells have a specific value assigned to them.

ArcGIS offers a couple options to convert NoData values to another constant, such as zero. One option is to use the Spatial Analyst Con (conditional) tool to convert NoData values. This can be called through the Spatial Analyst toolbox directly or used in conjunction with the IsNull tool in Raster Calculator.

Procedure

In both version 10 and 9.3, the Con tool can be used outside of the Raster Calculator to create a new raster with reset NoData (Null) values. However the Raster Calculator may also be used to call the Con and IsNull tool to perform the same task. The syntax is different in 9.3 and in 10. Examples are shown below.

Below is an example a statement for the Raster Calculator in 9.3:
-show me-


[O-Image]

Below is an example the statement for the Raster Calculator in 10:
-show me-


[O-Image]


Related Information


Created: 6/3/2008
Last Modified: 1/27/2012

Article Rating: (4)
If you would like to post a comment, please login

Comments

By Dryinwater - 12/08/2012 4:47 AM

The article is incorrect or the solution didn’t work.

I wanted to convert Nodata value into 0. Because Nodata value of my image is really lower than valid range, which is -3.4028234663e+038. Then I used con and isnull statements on raster calculator. But it didn't work, the Nodata value of output image is still the same with before it was. Can you tell me why? here is the calculation: Con(IsNull("tmp_2000.tif"), 0, "tmp_2000.tif")

Rating:

By Anonymous - 12/23/2010 3:39 PM

I have suggested related resources/links that can enhance this article. See below.

Apologies for the above (duplicate!) comments. Double wrong.... The major point still stands, even if my example is awful. New syntax for the Con function: Con (in_conditional_raster, in_true_raster_or_constant, {in_false_raster_or_constant}, {where_clause}). Adjust accordingly.

Rating:

By Anonymous - 12/23/2010 2:20 PM

I would like to see a new article that discusses the topic outlined below.

The example code here needs to be altered to work with version 10. Syntax for the Con function has been shifted to: Con (in_conditional_raster, in_true_raster_or_constant, {in_false_raster_or_constant}, {where_clause}). The 10 version of the map algebra expression can be: Con([], [], [desired new value], "VALUE IS NULL")

Rating:

By Anonymous - 12/23/2010 2:20 PM

I would like to see a new article that discusses the topic outlined below.

The example code here needs to be altered to work with version 10. Syntax for the Con function has been shifted to: Con (in_conditional_raster, in_true_raster_or_constant, {in_false_raster_or_constant}, {where_clause}). The 10 version of the map algebra expression can be: Con([], [], [desired new value], "VALUE IS NULL")

Rating: