I am using ArcMap 10.6.1 and I need to expand a large raster with tens of thousands of zones by 1 cell using either the expand tool or a map algebra expression. The tool asks to specify each zone to be expanded but I have too many zones for this approach.

How can I write a map algebra expression in raster calculator to expand all zones in the input raster without entering each zone value separately i.e. is there a way to write it so it expands zones from one number through to another?

So for a range of raster values from the input raster.


It might not be perfect, but if you have access to the Spatial Analyst extension, you could try “Focal Statistics using a 3-cell circle and the “Majority” statistic, ignoring no data cells in the calculation. The efficacy of this approach will really depend on the complexity of your zone boundaries and proximity to adjacent zones.

Alternatively, if you know that you won’t have any areas where expanded zones will become adjacent to other zones, you could: 1. create a mask where zone cells = 1 and all others are 0 with Con(InRaster, 1, 0) 2. Perform the expand function on the mask raster with the value 1 to be expanded. 3. Use Region Group on the expanded zones to identify unique regions 4. Use Zonal Statistics to determine the original values from your initial zones, within the newly expanded regions. And yes, those 4 steps could be combined in one large raster calculator expression if desired.

Your Answer

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

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