Summary
Counting the number of polygon features within a polygon is a basic and useful statistic when performing spatial analysis. The image below shows a polygon layer of a hypothetical region in the city of Columbus, and another polygon layer of historic neighborhoods within it.
This article provides the instructions to determine the number of historic neighborhoods in the region using the Spatial Join tool in ArcMap and ArcGIS Pro.
Procedure
In ArcMap
- Navigate to ArcToolbox > Analysis Tools > Overlay > Spatial Join. The Spatial Join window opens.
- In the Spatial Join window, fill in the required fields and parameters as follows:
- Target Features: The target polygon layer. In this example, the target polygon layer is Columbus_region.
- Join Features: The polygon features found within the target polygon layer. In this example, the input is Historic_neighborhood.
- Join Operation (optional): Select JOIN_ONE_TO_ONE and check the Keep All Target Features (optional) check box.
- Match Option (optional): Select COMPLETELY_CONTAINS.
- Leave the other parameters as default.
- Click OK to run the tool.
- In the Table Of Contents pane, browse to and right-click the output layer, and select Open Attribute Table.
- In the attribute table, look for the Join_Count field. The number in the field represents the number of polygon features within the target polygon layer, which in this example is the number of historic neighborhoods in the hypothetical region of the city of Columbus.
In ArcGIS Pro
- Navigate to the Geoprocessing pane. Click Toolboxes > Analysis Tools > Overlay > Spatial Join.
- In the Spatial Join window, on the Parameters tab, fill in the required fields and parameters as follows:
- Target Features: The target polygon layer. In this example, the target polygon layer is Columbus_region.
- Join Features: The polygon features found within the target polygon layer. In this example, the input is Historic_neighborhood.
- Join Operation: Select Join one to one and check the Keep All Target Features check box.
- Match Option: Select Completely contains.
- Leave other parameters as default.
- Click Run to run the tool.
- In the Contents pane, browse to and right-click the output layer, and select Attribute Table.
- In the attribute table, look for the Join_Count field. The number in the field represents the number of polygon features within the target polygon layer, which in this example is the number of historic neighborhoods in the hypothetical region of the city of Columbus.