Monday, 12 August 2019

Counting NoData values in raster using ArcGIS Desktop?


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 = arcpy.sa.Con(arcpy.sa.IsNull(rGround),
arcpy.sa.FocalStatistics(rGround, arcpy.sa.NbrCircle(FillRadius,"CELL"), "MEAN"),
rGround)

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.




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...