Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

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 have created a raster in ArcGIS Desktop 10 with a large number of holes (NoData) in it.

I want to fill the holes using something like the the following:

rOut =,,,"CELL"), "MEAN"),

It is desirable to fill the holes by averaging across a circle with a relatively small radius, but a small radius leaves larger holes unfilled, so I need to iterate this operation.

To do that I would like to be able to get the number of NoData values in my raster, once it reaches zero I can stop filling.

share|improve this question

Actually, it sounds like you want to find the smallest radius necessary to patch the raster. That can be obtained as the maximum of the Euclidean distance to the data cells.

To count the number of NoData cells in any raster, compute an indicator of those cells and sum it. The NoData indicator in ArcGIS is called IsNull (as shown in your sample code): by definition, it returns 1 at NoData cells and 0 elsewhere.

share|improve this answer

Your Answer


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