Select to view content in your preferred language

Replace Nulls in floating point rasters

1950
2
06-29-2013 06:21 AM
ErnestDunwoody
Emerging Contributor
Hello,

Is there anyway to replace Null values in floating point rasters? I need to preserve at least 3 decimal points for accuracy.

I can see a couple of methods such as using IsNull and Con but I understand they work with integers.

Alternatively, Is there any way to guard against Nulls occuring when I use the Polygon to Raster Conversion Tool?
All polygons (many hundreds of them) had values in the value field when I created the raster.

Thank you for any advice on either of these queries.

Sincerely,
Ernest
0 Kudos
2 Replies
DanPatterson_Retired
MVP Emeritus
did you try Con and IsNull?  they work with any grid
0 Kudos
curtvprice
MVP Alum
Is there any way to guard against Nulls occuring when I use the Polygon to Raster Conversion Tool?


Before you convert to raster, set the extent so no areas in the extent (a square) are entirely covered by your input polygons.

Is there any way to replace Null values in floating point rasters?


Con and IsNull are local operators, they cannot fill in NoData cells, unless you have a single value you want to use (like zero), which I don't think is what you're after here.

If you have single cells you want to fill in with a 3x3 neighborhood mean, here's an approach that would work in the Raster Calculator.

Con(IsNull("inraster"), FocalStatistics("inraster",NbrRectangle(3,3,"CELL"),"MEAN"))
0 Kudos