Knowledge Base - Technical Articles


Technical Article   HowTo:  Count the number of point features within a polygon

Article ID: 30779
Software:  ArcGIS - ArcEditor 8.3, 9.0, 9.1, 9.2, 9.3, 9.3.1, 10 ArcGIS - ArcInfo 8.3, 9.0, 9.1, 9.2, 9.3, 9.3.1, 10 ArcGIS - ArcView 8.3, 9.0, 9.1, 9.2, 9.3, 9.3.1, 10 ArcGIS for Desktop Advanced 10.1, 10.2, 10.2.1, 10.2.2 ArcGIS for Desktop Standard 10.1, 10.2, 10.2.1, 10.2.2 ArcGIS for Desktop Basic 10.1, 10.2, 10.2.1, 10.2.2
Platforms: N/A

Summary

Instructions provided describe how to count the number of point features that are contained in a polygon.

 For help in determining how to symbolize your map based on the number of point features contained or intersecting a polygon, please refer to knowledge base article 43094, How to symbolize polygons based on the number of intersecting points.


Procedure

Create a count field and a spatial join between the point shapefile and the polygon shapefile.

  1. In the attribute table of the point shapefile, create a field called 'Count' of type 'Short Integer'.
  2. Calculate the Count field equal to 1 by right-clicking the field name > Field Calculator > Enter a 1 in the white dialog area below "Count = ", and click OK. -show me-

    [O-Image] Field Calculator Count = 1
  3. Right-click the polygon shapefile and click Joins and Relates > Joins. Click the dropdown list and select 'Join data from another layer based on spatial location'.
  4. Specify the point shapefile from Step 1.
  5. Select the first bullet (Each polygon is given a summary of the numeric attributes...) and check the 'Sum' box.
  6. Specify an output location, and click OK.
  7. A polygon shapefile with the 'Count' field indicating how many point features lie within each polygon feature is now present. This is usually named 'Sum_Count' or 'Count_'.

Related Information


Created: 5/8/2006
Last Modified: 11/14/2014

Article Rating: (15)
If you would like to post a comment, please login

Comments

By natgeo1984 - 11/07/2014 1:44 PM

Great article! It helped a lot!

This is exactly what I was looking for, thank you so much!

Rating:

By ivv-splatz - 08/17/2014 6:08 AM

Great article! It helped a lot!

Thanks for this very helpful article!

Rating:

By Lomex_ - 07/13/2014 1:09 AM

Great article! It helped a lot!

Rating:

By dshubha - 02/12/2013 7:24 AM

Other - See details below.

It did not exactly work for me. Has anyone an idea what happens to the points that lie on the boundary of polygons? My point file has several such points that seem to have been counted twice since they are located at the common boundary of the polygons.

Rating:

By Mosheur - 10/03/2012 12:27 AM

Great article! It helped a lot!

Rating:

By lilli1 - 09/05/2012 3:02 PM

Great article! It helped a lot!

Thanks, the join actually does work (and properly!) though it was not intuitive at first due to the many:many problem.

Rating:

By lilli1 - 09/05/2012 2:38 PM

The article is incorrect or the solution didn’t work.

This only works if the polygons do not overlap. When collecting points that may have a 1:many or even many:many this will not work (e.g., multi buffer point collection)

Rating:

By mattkelso - 08/02/2012 7:35 AM

Great article! It helped a lot!

Why this isn't an official tool in the ArcGIS toolbox is beyond me. Luckily, it is simple to do if you stumble across the right instructions. Yes, this method does create "Count_" and "Sum_Count" columns with identical data, but it is easy enough to delete the duplicate.

Rating:

By Chad_Kopplin - 04/26/2012 10:55 AM

The article needs to be updated.

This is what I needed, it does what I need.

Rating:

By rightasrain - 10/14/2011 1:09 PM

Great article! It helped a lot!

Works great. Is there a way to get the table to recalculate itself if the shape of the polygon changes?

Rating:

By bentemb@geoinsight.no - 09/14/2011 6:16 AM

Great article! It helped a lot!

Good! Simpel and to the point.

Rating:

By Cyrillem - 06/30/2011 12:23 AM

The article needs to be updated.

Helpful but can be simplified. This method creates two fields with the results. Count_ and Sum_count

Rating:

By Anonymous - 04/05/2011 1:23 PM

The article needs to be updated.

Exactly what I was looking for!

Rating:

By Anonymous - 03/30/2011 10:19 AM

The article contains a dead link.

Will not work on data sets with Global ID numbers.

Rating:

By Anonymous - 11/12/2009 11:01 AM

The article is incorrect or the solution didn’t work.

The field name of COUNT is reserved, and you do not need to create a new field, it automatically calculates the COUNT when you do a spatial join.

Rating: