1

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.

2
  • 1
    Null vales exist in database rows. You want to search on "nodata" within rasters.
    – Vince
    Commented Sep 13, 2017 at 10:40
  • Also a zero value is neither null or nodata! It is a number.
    – Hornbydd
    Commented Sep 13, 2017 at 13:27

1 Answer 1

2

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.

2
  • 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!).
    – Jeff Price
    Commented Sep 13, 2017 at 22:54
  • @JeffPrice if the answer suits your needs, please mark it as “Answered” to help the community.
    – Jae
    Commented Sep 13, 2017 at 23:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.