I'm working with two different point layers (layer1 and layer2). Layer1 will have a field (field1) that contains four possible values (a, b, c, d) and another field (field2) that contains a given length associated with that point.

Layer2 has fields that match each possible field1 value from layer1, but need to be populated with the length values from field2.

Using ArcPy/Python, how can I first select all the layer1 points that are within 5 feet of a layer2 point (sometimes there will only be one), check the value for field1, find the sum of the total values of field2, and then update the corresponding field from field1 in layer2 with that field2 value?

For example, I have two layer1 points near a layer2 point where the field1 value is "c" and field2 is "10" for both. I want to update the field titled "c" in layer2 with a value of "20".

1 Answer 1


A model with a feature selection iterator stepping over points in layer 2 doing a select by location, feeding into a summary stats tool then joining the data, calculate then break join. No code required at all.

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