I have a task to create a grid (point feature class)(using Create Fishnet) in the extent of population raster (value of 1px represents number of people living in that area) and then extract values of the raster into this grid. However, in each point of the grid, I don´t want only the value of the pixel right below the grid point, but sum of values of this point and 8 neighboring pixels, so sum of 9 pixels. I tried using Extract Values to Points, but it only allows to extract the 1 value of the pixel below the point. The idea is that in the end, summing up these extracted values from the points should be equal to summing up values of all pixels of the underlying raster. So any idea, how should I go about this? Is this possible in arcpy?

enter image description here

[The point feature represented by black dot shoud contain attribute value of sum of raster pixel values of 9 neighboring pixels arround and including the pixel under the point (9 pixels that should be summed up are represented by distinct colors]


The "Focal Statistics" tool can be set up to Sum a rectangular window of 3 x 3 cells in a moving window. This creates a new raster layer from which you can extract your values to your points.

The ArcPy syntax for this is at: http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-analyst-toolbox/focal-statistics.htm

| improve this answer | |

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.