Thursday, 8 August 2019

Dealing with NoData in ArcGIS Spatial Analyst?



When using Spatial Analyst I regularly have issues with NoData values cropping up in the data.


Various tools appear to introduce NoData values regularly.


These values then cause issues with other tools and have to be eliminated with reclassification, usually resulting in other problems.


How should NoData values be dealt with? Is there a simple way to replace NoData values with zero? Can NoData be avoided altogether?



Answer



I would have used the raster calculator with the following expression:


Con(IsNull([raster]), 0, [raster])

It assumes that your raster is called 'raster'.





The 10.x Raster Calculator tool syntax is slightly different. In this example, "raster" is a layer in the map:


Con(IsNull("raster", 0, "raster")

No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...