Select to view content in your preferred language

Raster Calculator

1609
1
04-25-2013 08:10 PM
meganherren
New Contributor
Im totally not understanding the raster calculator and how to build statements. I have a stream network and some lakes that I have build and put some buffers around. I need to covert my raster verisons of my buffers to a 1,0 raster (with a value of 1 for areas outside of the buffer and 0 within it). I need to use the con and isnull function, but I have no idea on how to bulid that statement. can anyone help me?
0 Kudos
1 Reply
JeffreyEvans
Frequent Contributor
To do this I create a dummy attribute field for my polygons and assign it a value of 1 to use as my raster field during conversion. Once you have converted your stream buffers to a raster using the AtcToolbox > Conversion Tools > To Raster > Feature to Raster tool you can assign your background values using the following con statement in the raster calculator and yes, it is case sensitive.

Con(IsNull("RivBuff"), 0, "RivBuff")

It is important that you set your analysis environment so ArcGIS knows "where" to create the 0 background values. Ideally you have a raster that will define your extent and mask. You set your environment under the ArcMap menu Geoprocessing > Environments...
And then "Processing Extent" and "Raster Analysis". If you do not have a preexisting raster to define this environment then you can use the "Same as Display" under extent which will return a raster with background values that matches your display in ArcMap.
0 Kudos