How to replace the cells that have ???no data??? with average values of the neighbor cell

315
2
04-12-2011 09:45 AM
Honored Contributor
How to replace the cells that have ???no data??? with average values of the neighbor cells?

Please, see the attached image that shows my question

Many cells in the given raster have no data, all what we need is to fill the ???no data??? cells??? with the average values of their neighborhood

We need to fill all the area bounded by magenta border.

How could we do that?

Thank you

Regards

Jamal
Reply
0 Kudos
2 Replies
Regular Contributor III
Jamal,

I posted the answer in the other thread you were in today, but posting here too just in case you miss it.

Con(IsNull("raster"),FocalStatistics("raster",NbrRectangle(3,3),"MEAN"),"raster")

You may need to increase the neighborhood size for your case.  You may also find the Overview of the Generalization toolset useful for this case as well.

Regards,
Eric
Reply
0 Kudos
Occasional Contributor II
Thanks Eric,

I couldn't get nibble to work with ArcGIS 10 sp2 (gave me output based only on values in the mask - even if I switched the input and mask around!!).

This was a good workaround.
Reply
0 Kudos