After merging or mosaicking grids in ArcView 3.x, there may be areas of no data cell values left between the grids. The following code sample will demonstrate how to fill these gaps.
theView = av.GetActiveDoc
theGrid = theView.GetActiveThemes.Get(0).GetGrid
theNbrHood = NbrHood.Make
theNewGrid = (theGrid.IsNull).Con((theGrid.FocalStats(#GRID_STATYPE_MEAN,theNbrHood,FALSE)),theGrid)
theGTheme = GTheme.Make(theNewGrid)
Just in case the copy/paste applies some justification to the script, be sure the line beginning "theNewGrid" is complete. Otherwise, the code may not compile.
Depending on the data, modification of the neighborhood may be necessary. Vertical and horizontal gaps, odd terrain shapes or large gaps require different neighborhood matrices to get positive results. The default 3x3 matrix is used in this code.
Get help from ArcGIS experts
Download the Esri Support App