Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In ArcGIS 9.3, I have a raster file that I would like to "mask" with polygons, giving a single value to all the raster cells that overlap the polygons.

How can I do this?

Here's a screen shot, where the black polygons are my polygon layer, and the rest is raster-based.

enter image description here

share|improve this question
up vote 11 down vote accepted

You can use a conditional statement. The issue with previous recommendations is that when you rasterize your polygons (which is necessary) the background, that does not contain polygons, will be NoData resulting in corresponding areas in the output also being NoData. You will need to set your analysis extent to your original raster and then set a background value (i.e., 0) to the rasterized polygon raster using SetNull. Once you have done this a conditional statement in the raster calculator will look something like this.

Con("praster" > 0, "praster", "OrgRaster")

"praster" is your rasterized ploygon feature class, with a background value of 0, and "OrgRaster" is the raster you wish to modify. This statement is saying that if praster is greater than 0 then assign values from praster else assign values from OrgRaster.

share|improve this answer
I ended up changing the raster extent, then doing reclassify to change the nodata values to 0. thanks! – Luke Nov 7 '12 at 15:25

I think you can rasterize (ArcToolbox > Conversion Tools > To Raster) your polygons, and then merge the two rasters. Try Spatial Analyst Tools > Math > Logical > Over.

share|improve this answer
While rasterizing polygons, in the Polygon To Raster dialog window, you need to go to Environments -> General settings and use Snap Raster option, to get the cells correspondent to your initial raster. – nadya Feb 8 '13 at 3:23

you could convert the value raster to polygon

then spatially join back to the zone polygon

then convert the zone polygon to raster, keeping the field from the spatial join

then i think you should mosaic them together, keeping the 'top' raster, ie the zone raster values (rather than sum/min/max/median)...

know what i mean?


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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