I have a raster file with the urban development of a county mapped out (values: 1=urban 0=not urban). I also have a raster file with several blocks of forested land, each block of land has its own numeric identifier and 2-1000 cells per block. The 2 rasters have the same cell size.

I need to calculate, for each individual cell in the forested lands layer, what percentage of the land within 4km is covered by urban development.

I'm using ArcGIS 10.1

Thanks in advance!

  • Please edit your question/tags to include the software you are using.
    – Barbarossa
    May 23, 2014 at 13:38
  • 1
    Have a look at the Focal Statistics tool in the help file .
    – Hornbydd
    May 23, 2014 at 13:51

1 Answer 1


I think the Focal Statistic tool, in conjunction with a couple of conditional statements in Raster Calculator will do what you are needing.

  1. First, get a count of all non-urban cells within the 4km neighborhood:

    Using raster calculator:

    nonurban_raster = Con("land_use_raster"==0, "1", "")

    Then with focal stat tool:

    sum_nonurban_raster = FocalStatistics("land_use_raster", NbrCircle(100, "CELL"), "SUM", "NODATA")
  2. Next, get the count of only urban cells, first by isolating urban cells with conditional statement in raster calculator.

    urban_raster = Con("Land_use_raster"==1, 1, "")

    and then with focal stat tool.

    sum_urban_raster = FocalStatistics("urban_raster", NbrCircle(100, "CELL"), "SUM", "NODATA")
  3. Finally, get your percentage by using raster calculator.

    pct_urban_raster = "sum_urban_raster" / ("sum_nonurban_raster" + sum_urban_raster")
  • Thanks for the assistance. I have 2 questions 1) is "land_use_raster" my forested lands raster or my urban areas raster? 2) when I use the forested lands raster the output from step 1 is a file with nothing in it (no attribute table).
    – user26142
    May 23, 2014 at 15:36
  • yes, land_use_raster contains your urban/non-urban binary, and will be the Input raster for the first focal statistic step. Are you running these from the command prompt or from ArcToolbox? Also, can you edit your question to include your raster cell sizes?
    – Barbarossa
    May 23, 2014 at 15:41
  • Okay, I just ran the first step with the urban/non_urban raster and it failed to execute. I'm running this from the raster calculator tool. My cell sizes are 40m x 40m for all rasters.
    – user26142
    May 23, 2014 at 15:44
  • Yes, I have the spatial analyst extension running.
    – user26142
    May 23, 2014 at 16:06
  • Okay, take a look at the link for the Focal Stat. It is a tool in the spatial analyst toolbox. It is run independently from the raster calculator. I'll edit my answer to reflect this.
    – Barbarossa
    May 23, 2014 at 16:08

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.