Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to programmatically access the NoData value in a raster dataset as shown in the screenshot.

enter image description here

Two tools that come to mind to describe raster properties do not seem to be able to describe the NoData value: Describe and Get Raster Properties (Data Management).

How can I programmatically access (i.e. print) the NoData value of a raster?

share|improve this question
up vote 3 down vote accepted

per comments - it seems the raster band properties contain a read-only no data property.

import arcpy

print desc.noDataValue

resulted in a value of -3.40282346639e+38 on a single bad ESRI binary grid that i had lying around.


share|improve this answer

I found the solution on an ESRI blog. The idea is to convert the raster to a raster object and then access the specific NoData value with .noDataValue.

import arcpy
arcpy.env.workspace = r'C:\temp'

rasterList = arcpy.ListRasters()

for raster in rasterList:
    rasterObj = arcpy.Raster(raster)
    noData = rasterObj.noDataValue

    print "NoData Value: %s \n" %noData
share|improve this answer
interesting. it might vary with the version of arc - but this says that the no data value is a read only property - perhaps only for multi-band rasters? – fluidmotion Aug 22 '14 at 18:06
Good call @fluidmotion--it appearas as if the documentation is different between 10.1 and 10.2. I would be happy to accept your answer if you write it up and provide an example of the .noDataValue in action. Thanks. – Aaron Aug 22 '14 at 18:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.