I have polygon and point feature classes. Every polygon have 2 points inside them. For output I need only one point with highest value. I need incorporate this step in ModelBuilder. I had idea about iterator, but I'm not sure about this since it might have problems with bigger feature classes and older hardware. So I'm looking a way around it.

enter image description here

1 Answer 1


I usually approach situations like this using a few steps. The general process is to determine the maximum value in each polygon and then determine which points actually has that value:

  • First join a unique identifier from the polygons to the points (Using intersect, spatial join, etc..). This doesn't have to be OBJECTID, but it can be.
  • Then run summary statistics on the output of that. Use the unique identifier that you just joined as the case field, and the value field that you are interested in as the statistic field and maximum as the calculation.

This will yield a list of polygons and the maximum value of its contained points.

  • On both the output from Summary Statistics and the intersected/joined points, create a new 'key' field by concatenating the polygon unique identifier and the point (max) value. I normally set this up as a text field and calculate them as follows (with the PYTHON_9.3 expression type)*:

    • For the points with polygon ids: !POLYGONID! + '-' + !POINTVALUE!
    • For the output of Summary Statistics: !POLYGONID! + '-' + !MAX_POINTVALUE!
  • Now, you can join the summary statistics table back to the points layer using this new key using Join Field or by just creating a join.

The features that get a record joined to them are the maximum value in each polygon and the rest can be discarded. This should work if you have multiple features with the maximum value, but in that case they will all be joined and it's not possible to select just 1 (since they are all technically the maximum).

*: One thing to watch out for when calculating the key is if your value or polygon ID is a floating point value you may need to specify a format when converting to a string (ie. '{0:.0f}-{1:.0f}'.format(!POLYGONID!,!POINTVALUE!) instead.


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.