I'd like to use the raster calculator to convert 0 values in the raster to 0.0001.
I was trying to use the syntax below
CON ("raster1" == 0, 0.001, "raster1")
Based on 39974 - Change a particular value of a raster dataset to zero without changing the other values
1. In ArcMap, navigate to ArcToolbox > Spatial Analyst Tools > Map Algebra and open the Raster Calculator.
2. In the Raster Calculator, input the following syntax:
Con("InRaster" == -9999, 0 , "InRaster")
All I get is errors in 10.3 (see attachment). I'm not a python user, so could really use help with this syntax.
Thanks for the help!
That is for older versions, check the current help files for Con
Thanks for pointing me to the area to check out... I had tried to find that source, but no luck.
I'll give these syntax examples a try.
A good link for bookmarking is the top of the Arctoolbox tree as in this link...
Con ("raster1", 0.0001, "raster1" == 0) was next syntax in raster caculator didnt' work either.
and
Con ("raster" == 0 , 0.0001, "raster1")
Con("elev_967_1","elev_967_1", 0.0001, "VALUE>0.0001")
Con("VALUE < 0.001","elev_967_1", 0.0001)
None of these worked.
Hi Laurie,
How are you adding the raster name to the statement? Are you double-clicking from the 'Layers and Variables' box within this tool? The error is indicating it cannot find the raster.
Jake,
Yes, I was double clicking into the Layers and variables in the dialog box... (These are not on my c: drive, but these layers are in arcmap currently.
Laurie