Raster Calculator: Fill in NoData

24304
9
Jump to solution
05-16-2011 06:33 AM
MarkCampbell1
New Contributor
I have a DEM that has missing points due to ponding water, how do I go into raster calculator and give the no data points a value, so I can fill them in with ArcHydro?


Thanks

Mark Campbell
0 Kudos
1 Solution

Accepted Solutions
TimothyHales
Esri Notable Contributor
Yeah, I'm pretty sure FocalMean does not work for ArcGIS 10.  Try a statement like this:

Con(IsNull(Raster), FocalStatistics(Raster, NbrCircle(10, "CELL"), "MEAN"), Raster)

View solution in original post

9 Replies
TimothyHales
Esri Notable Contributor
This has been answered on the following thread: Fill no data values areas in DEM

Within the Raster Calculator use a similar expression as below:

con(isnull(Raster_DEM), focalmean(Raster_DEM, rectangle,4,4), Raster_DEM)

This will look for the NoData values in the raster and for those locations find the focal mean. If the value is not
NoData then it will keep the value.
0 Kudos
Li_ShuenNg1
New Contributor

Hi Timothy, I'm facing the same issue with a map that has no data values. Con(IsNull("raster"), FocalStatistics("raster", NbrRectangle(5,5, "CELL"), "MEAN"), "raster") is what I input, it worked but the map became coarser. How do I know which rectangle (e.g. "5,5") suits my data, in order to retain the original outlook in the first image? Here is the before and after.

0 Kudos
MarkCampbell1
New Contributor
I tried:

Con(IsNull("DEM"), FocalMean("DEM",rectangle,4,4),"DEM")

FocalMean shows up as undefined,  Is it a problem that I am trying to run this in Arc 10?

Also, I couldn't find that link to the other thread,

Thanks,
Mark
0 Kudos
TimothyHales
Esri Notable Contributor
Yeah, I'm pretty sure FocalMean does not work for ArcGIS 10.  Try a statement like this:

Con(IsNull(Raster), FocalStatistics(Raster, NbrCircle(10, "CELL"), "MEAN"), Raster)
AriannaNumi
New Contributor

Dear Mr Hales,

where could I find a guide for the syntax for different types of neighborood? I am not sure about the meaning of the (10,''CELL'') in the expression you use; I can guess that it means a circle with a 10 cell radius? What are the alternatives to ''CELL''?

Thank you so much,

Arianna N.

0 Kudos
TimothyHales
Esri Notable Contributor

Hi Arianna Numi​,

The values in the syntax represent radius and units. You can get more explanation from ArcGIS Help | Focal Statistics 

BarryGuidry
Occasional Contributor
Mr. Hales, that worked great! I did only have to adjust the search value a bit for one of my grids to fully encompass the extracted building footprints.
0 Kudos
lauriehogan
New Contributor
This has been answered on the following thread: Fill no data values areas in DEM

Within the Raster Calculator use a similar expression as below:

con(isnull(Raster_DEM), focalmean(Raster_DEM, rectangle,4,4), Raster_DEM)

This will look for the NoData values in the raster and for those locations find the focal mean. If the value is not
NoData then it will keep the value.



Q.  Does this fill all holes in the raster?  What if I only want to fill one hole and leave the rest alone - it seems a different approach/workflow is needed.  Appreciate any guidance you might have.  Thanks.
0 Kudos
curtvprice
MVP Esteemed Contributor
Q.  Does this fill all holes in the raster?


As long as they are no farther across than the neighborhood kernel provided to FocalStatistics.

What if I only want to fill one hole and leave the rest alone - it seems a different approach/workflow is needed.  Appreciate any guidance you might have.  Thanks.


You can to extract the rectangular area of of the raster you want to modify, run the FocalStatistics operation, (or some other approach, for example, Nibble), and then paste it back in using the Mosaic tool.