I am converting a large set of polygons into a single raster where all of the polygon values are 1. When I do this I do not have null values (0) for the rest of the cells. I looked through polygon to raster and can't find a set null value. I tried setnull within raster calculator and it just changes the values of the polygons. What I need is a raster with 1 for protected area and 0 for no protected area so I can run a number of calculations.
1 Answer
Easiest for your case would likely be to use the Reclassify tool to change the cell values as required. Alternatively, you could use the Raster Calculator with Conditional statements Con() and IsNull().
In Raster Calculator it would look like: Con(IsNull(YourRaster), 0, 1)
As @Vince had mentioned, those are referred to as NoData cells in a Raster, but some of the Spatial Analyst tools do still refer to them as Nulls (I.e. SetNull(), IsNull(), etc.). Good times.
-
Both of these techniques worked (and, gave the same answer!). You are right that reclassify was better (and a technique I had not seen suggested in other places!). Commented Sep 13, 2017 at 22:54
-
@JeffPrice if the answer suits your needs, please mark it as “Answered” to help the community.– JaeCommented Sep 13, 2017 at 23:07