ArcGIS Toolbox – Calculate Point Statistics within Polygon with ArcPy

Share Button

Updated – 2/27/2015
Fixed compatibility with Python 3 for ArcGIS Pro

(If you’re using Firefox, then right click and Save Link As)
Download the Calculate Point Statistics Toolbox – works with ArcGIS 10.1+
View the Source Code

The Calculate Point Statistics tool takes an input Polygon and Point feature class and uses a selected field to find the minimum, maximum, and average of the points and adds the results to the polygon feature.

Be sure to view the Tool Help within the tool dialog box for detailed instructions. Also, check the Geoprocessing Results for any error messages.

Here’s a screenshot of the parameters:
Calculate Point Statistics parameters

I hope someone finds this tool useful. If you’d like this tool to calculate additional statistics for the points, let me know. Please leave a comment if you have any questions or problems, and be sure to check out the other tools I’ve created!

8 thoughts on “ArcGIS Toolbox – Calculate Point Statistics within Polygon with ArcPy

  1. May 1, 2014 at 12:37 pm

    Hi Ian,

    Thanks for providing the answer to my question on gis.stackexchange I really appreciate it. I wish I was more familiar with ArcPy so I could easily modify your code to generate min. values only and to extract as a point file. Would you see any use for this in your work? Let me know if you don’t mind modifying it, I’ll really appreciate it and I’d owe you one.

    Thanks and keep up the good work

    1. Ian
      May 1, 2014 at 2:24 pm

      Yeah, I can definitely do that. The only part I’m unsure of is where the point that is kept for each polygon should be placed? Should I keep its current location or place it at the centroid of the polygon? If I place it at the centroid of the polygon, it may save you from needing to go back and snap it the line. What do you think?

      1. Mehmet Dagci
        July 18, 2016 at 12:36 am

        Hello Ian

        I m so appriciated for your scripts

        Now I want to find minimum value for ueach polygon but write in to point file and keep thier location as it is is it possible? Please help me, thanks

        1. Ian
          August 30, 2016 at 5:58 pm

          Hi Mehmet Dagci, you might try asking on GIS Stackexchange – they should be able to help you there.

  2. Manuel
    November 10, 2015 at 5:58 am

    Ian, how would I go about adding the XY for the min and max points?

    1. Ian
      November 12, 2015 at 6:18 pm

      Hi Manuel, where exactly do you want to XY added? To the polygon?

  3. September 30, 2016 at 1:51 am

    Thanks for providing the Calculate Point Statistics Toolbox . It help me to come out my point mean value within polygon calculation problem it, I’ll really appreciate it and I’d owe you one.

    Thanks and keep up the good work

    1. Ian
      October 16, 2016 at 9:51 pm

      Hi Suresh, thanks for the comment! I’m glad you found the tool useful.

Leave a Reply

Your email address will not be published.