Is there a way to convert polygon features to raster while also populating null cells with a specific value? As in, can I create a raster from a polygon shapefile and have the tool populate all null cells with a value of zero (0)? I'd like to do this because I will eventually sum several rasters using Raster Calculator, and it doesn't handle null values very well.

I know how to use the "Con(IsNull)" forumla in raster calculator to achieve this once the raster has been created, but would like to avoid having to perform this extra step if possible.

  • Can you draw a picture? If you want everything outside the polygon to be NULL and everything inside the polygon to have values derived from the polygon you can run the tool as normal and set the NoData value to 0 on the image, provided that 0 isn't a valid value within the data, if some of your polygons will have 0 as a value then this will need to be a two or three step process.. please indicate what valid values you will be encountering. – Michael Stimson May 11 '15 at 22:37
  • I'm unable to draw a picture, but I think you're on the right track. My focus, or "study" area, is a circle with a 1-mile radius. My polygons are service areas within that circle. I'd like to create a raster that has values greater than zero for my polygons, and values of zero everywhere outside of my polygons, but within my 1-mile circle. – sdchris85 May 11 '15 at 23:23
  • It seems like the best approach would be to run the "polygon to raster" tool and use my circle polygon shapefile as the processing extent, and also set the NoData values to zero. Is this possible? – sdchris85 May 11 '15 at 23:26
  • Feature to Raster resources.arcgis.com/en/help/main/10.1/index.html#//… will give you values inside the 1-mile and 0 outside, but that only affects the raster you're creating. Beware of your environment NoData setting resources.arcgis.com/en/help/main/10.1/index.html#//…, that should be set to NONE. If that's not playing ball then set the NoData to MINIMUM, run the tool and then change the NoData in the raster dataset in catalog to maximum + 1 (must be unsigned data type). – Michael Stimson May 11 '15 at 23:27
  • 1
    You're not going to get a circle in a raster, meaning there's a distinction between outside the circle in the (rectangular) raster extents which is nodata, and inside the circle but not your polygons which should be 0. This is background vs true nodata in a raster. I think the easiest thing to do is incorporate your circle into your polygons as just another polygon and give it a zero value/attribute. That way when you rasterize the polygons, you'll get your zero pixels and nodata. It's not that rc doesn't handle them well, it's that any math involving null results in null. – Chris W May 12 '15 at 0:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.