Is Null |
|
|
Release 9.3
Last modified September 7, 2011 |
Print all topics in : "Math Logical (Spatial Analyst)" |
Returns 1 if the input value is NoData and 0 for cells that are not, on a cell-by-cell basis within the Analysis window.
Learn more about how Is Null works
Illustration
OutRas = IsNull(InRas1)
IsNull_sa InRas1 OutRas
Usage tips
Command line and Scripting
Input values can be positive or negative.
The output value types are always integer. The values are either 1 or 0. Cells in the input that have a value are given 0 on the output. Cells that are NoData in the input are given a value of 1 on the output.
The following environment settings affect this tool:
Map Algebra
Input values can be positive or negative.
The output value types are always integer. The values are either 1 or 0. Cells in the input that have a value are given 0 on the output. Cells that are NoData in the input are given a value of 1 on the output.
Learn more about how to specify the input raster dataset in the Map Algebra expression of Raster Calculator.
ArcObjects
Input values can be positive or negative.
The output value types are always integer. The values are either 1 or 0. Cells in the input that have a value are given 0 on the output. Cells that are NoData in the input are given a value of 1 on the output.
The output from the ArcObjects method is a raster object.
Command line syntax
An overview of the Command Line window
IsNull_sa <in_raster> <out_raster>
| Parameter | Explanation | Data Type |
| <in_raster> |
The input being tested to identify the cells that are NoData (null). |
Composite Geodataset |
| <out_raster> |
The output raster. Where cell values in the input are NoData, the output value will be 1. If it is any other value, the output value will be 0. |
Raster Dataset |
IsNull_sa C:/data/ras_1 C:/data/final_1
Scripting syntax
About getting started with writing geoprocessing scripts
IsNull_sa (in_raster, out_raster)
| Parameter | Explanation | Data Type |
| in_raster (Required) |
The input being tested to identify the cells that are NoData (null). |
Composite Geodataset |
| out_raster (Required) |
The output raster. Where cell values in the input are NoData, the output value will be 1. If it is any other value, the output value will be 0. |
Raster Dataset |
# IsNull_sample.py
# Description:
# Returns 1 for cells in the input raster that have a value of
# NoData, and 0 if they do not.
# Requirements: None
# Requirements: None
# Author: ESRI
# Date: Sept 6, 2005
# Import system modules
import arcgisscripting
# Create the Geoprocessor object
gp = arcgisscripting.create()
try:
# Set the input raster dataset
inRaster1 = "c:/data/ras_1"
# Set the output raster name
outRaster = "c:/data/final_1"
# Check out Spatial Analyst extension license
gp.CheckOutExtension("Spatial")
# Process: IsNull
gp.IsNull_sa(inRaster1, outRaster)
except:
# If an error occurred while running a tool, then print the messages.
print gp.GetMessages()
Map Algebra syntax
IsNull(<grid>)
| Parameter | Explanation |
| <grid> | An input integer or floating-point raster, or an expression resulting in a raster. |
isnull(ingrid1) isnull(-5.6 + ingrid1) isnull(ingrid1 + ingrid2) isnull(sin(ingrid1) * 4) + (focalsum(ingrid2))
ArcObjects syntax
ILogicalOp::IsNull (geoDataset As IGeoDataset) As IGeoDataset
| Parameter | Explanation |
| geoDataset | An input Raster, RasterDataset, RasterBand, or RasterDescriptor. |
' Create the RasterLogicalOp object
Dim pLogicalOp As ILogicalOp
Set pLogicalOp = New RasterMathOps
' Create the input raster object
Dim pInputDataset As IGeoDataset
' Calls function to open the input raster dataset from disk
Set pInputDataset = OpenRasterDataset("D:\SpatialData", "inputraster")
' Create the output dataset object
Dim pOutputDataset As IGeoDataset
' Calls the method
Set pOutputDataset = pLogicalOp.IsNull(pInputDataset)