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.
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
- a dataset that defines the zone (your buffer polygons),
- a zone field (some unique ID field in the buffer polygons),
- a raster that contains the values on which to calculate a statistic (your nighttime lights),
- 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:
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.