Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I've been searching around for the answer to this (including here) and have yet to find it. I'm interested in finding out how to calculate a 'neighborhood sum' for vector, polygon data. I am aware of how to do this with rasters- the equivalent, then, would be to compute a focal sum for each polygon.

I use ArcView 10.

Thanks for your assistance!

share|improve this question
add comment

3 Answers

The only meaningful neighbourhood for polygons that occurs to me is adjacency; an approach might be to iterate through the polygon feature class in a script generating temporary feature layers for each with the selection by location tool and the method set to touching the boundary of your polygon. For each feature layer you can summarise any attributes and write back to the original feature. Basically:

  1. Make a feature layer for one polygon,
  2. Select by location for touching (adjacent) polygons,
  3. Use copy features to make the selection layer semi-permanent (I'd use the in_memory workspace here),
  4. Use a cursor to read and summarise the values from the adjacent features,
  5. Write these to the original polygon
  6. Delete any temporary data and move to the next polygon

This is a fairly slow algorithm, so you might want to use tricks like the in_memory workspace to speed it up; it will be pretty slow for large data sets. I hope this helps.

share|improve this answer
add comment

With ArcGis 10.1, you can use the function Polygon Neighbors that creates a table with statistics based on polygon contiguity.

With the output table, you can compute all stat you want.

share|improve this answer
add comment

to compute a focal sum for each polygon.

What would be the focus of each sum?

You could make a grid, split/join all of the polygons to a grid and then compute the statistics you want grouping by grid ID.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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