I have created a layer of polygons with buffers around my points of interest, all of the same size, in ArcGIS. I also have a raster layer of nighttime lights with pixel values between 0 and 63 clipped to the country of interest. I would like to know how to add the average pixel value of the raster within each buffer area to the attribute table of the buffers. The attribute table of the night lights has 3 columns, the object ID, value and count.

  • 1
    See zonal statistics
    – Barbarossa
    Jul 20, 2015 at 13:47
  • I have used zonal statistics with the buffers and raster as input, and this visually gives what I'm looking for, but the output does not have an attribute table and does not allow me to build one
    – Gina K
    Jul 20, 2015 at 13:52

1 Answer 1


You could use Zonal Statistics as Table to generate a table with a Unique ID field that can be used to join to the polygon buffer attribute table.

The tool takes

  1. a dataset that defines the zone (your buffer polygons),
  2. a zone field (some unique ID field in the buffer polygons),
  3. a raster that contains the values on which to calculate a statistic (your nighttime lights),
  4. a location for the output table.

Also, you can optionally specify which stat to calculate. Then use the "ID" field in the polygon buffer shapefile and the "ID" field in the resulting zonal stat table to perform a tabular join.

The resulting table will resemble the bottom table in this image:

enter image description here

The resulting table can then be joined to your polygon using the unique value (zone field) from above.

It may be necessary to add a unique ID field. Add a field to the polygon buffer and name it "ID" or something like that. Copy the UID or OBJECTID to this field using field calculator. In the zonal stat as table tool, use this "ID" field as the zone field.

  • Thanks, unfortunately to do this from the raster it does not work as it does not give location, and trying to do it with the buffer and raster creates an error. I would like to end up with buffers with average light values (the average pixel value in that area)
    – Gina K
    Jul 20, 2015 at 14:57
  • 1
    What error are you receiving? See edits above.
    – Barbarossa
    Jul 20, 2015 at 15:07
  • The error is 010067: Error in executing grid expression
    – Gina K
    Jul 21, 2015 at 10:09
  • I have used the same parameters you described above with the zonal statistics tool which does not give an error, however the output does not have an attribute table and does not allow me to build one, even though the raster is one band
    – Gina K
    Jul 21, 2015 at 10:16
  • The output will be a table.
    – Barbarossa
    Jul 21, 2015 at 13:16

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.