I have the following raster layer that has data gaps. I can use focal statistics to fill them:
Con(IsNull("raster"), FocalStatistics("raster", NbrRectangle(5,5, "CELL"), "MEAN"), "raster")
However, I want to use a zonal layer and limit the neighbors based on that layer so that the function only uses the mean of all the neighboring values that are in the same zone.
Irregular
neighborhood settings? I am thinking the zonal boundaries could be provided through the kernel file specification, but I am not sure how the kernel file is specified. It is worth looking at.set mask
environmental setting while doing your focal analysis? If you set your environmental settings to the processing extent and raster mask to your zone (this needs to be done zone by zone too) while doing your focal analysis it might work out. if you don't have to many zones, you can then mosaic/merge the different raster regions interpolated by zones. I found similar solution proposed and accepted here on GIS SE.