Hi all,
I am using ArcGIS Pro 2.9. I want to use arcpy to obtain the nodata value for a raster, but can't figure out how to do that. It is not listed in getRasterProperties(). Any help would be appreciated.
Raster Band properties—ArcGIS Pro | Documentation
even for single band rasters... aka rasters
noDataValue(Read Only)The NoData value of the raster band.
I am not sure how I missed that in the documentation. I appreciate your assistance and not sure I want my question preserved for all eternity, but maybe someone else will ask the same question. Thanks again
To add to Dan's answer
arcpy.da.Describe(your_raster)["noDataValue"] # or arcpy.Raster(your_raster).noDataValue
https://pro.arcgis.com/en/pro-app/latest/arcpy/classes/raster-object.htm#P_GUID-E0D56F9F-CABB-4BB7-BE6F-E96E02858F00
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.