Note:
This functionality is currently only supported in Map Viewer Classic (formerly known as Map Viewer). It will be available in a future release of the new Map Viewer.
The Aggregate Points tool uses area features to summarize a set of point features. The boundaries from the area feature are used to collect the points within each area and use them to calculate statistics. The resulting layer displays the count of points within each area.
Analysis using GeoAnalytics Tools
Analysis using GeoAnalytics Tools is run using distributed processing across multiple ArcGIS GeoAnalytics Server machines and cores. GeoAnalytics Tools and standard feature analysis tools in ArcGIS Enterprise have different parameters and capabilities. To learn more about these differences, see Feature analysis tool differences.
Workflow diagram
![Aggregate Points workflow diagram Aggregate Points workflow diagram](GUID-6C1620D9-D176-41FA-8283-833D8B1CCCFC-web.png)
Examples
Tornadoes are one of the most violent types of storms that occur in the United States. You want to know the effect of tornadoes, including loss of life, injuries, property damage, and financial loss, in each state and county. You have access to tornado locations across the United States, but you need a better way to visualize your data within the boundaries of your choice. You can aggregate your tornado data into state and county boundaries and normalize your data by population to find the areas most affected by tornadoes.
Tip:
If your portal is configured to use ArcGIS Living Atlas content, you can use the state and county ArcGIS Living Atlas layers, which include population data.
Usage notes
Aggregate Points is designed to collect and summarize point features within a set of boundaries. The input parameters must include points to be aggregated and aggregation areas.
You can provide the area layer to use for analysis, or you can generate bins of a specified size and shape (hexagon or square) into which to aggregate. The bin size specifies how large the bins are. If you are aggregating into hexagons, the size is the height of each hexagon and the width of the resulting hexagon will be 2 times the height divided by the square root of 3. If you are aggregating into squares, the bin size is the height of the square, which is equal to the width.
![Hexagonal and square bins Hexagonal and square bins](GUID-9DC1281D-6E1B-48F9-9BDD-67D3B337CD30-web.png)
Only areas that contain points will be returned, and resulting areas will be completely removed from the result layer.
![Areas returned with point features Areas returned with point features](GUID-941D5AF4-9E58-4749-A2FB-91EF4E65EA02-web.png)
The most basic aggregations will calculate a count of the number of points in each boundary. Statistics (count, sum, minimum, maximum, range, mean, standard deviation, and variance) can also be calculated on numerical fields, and statistics (count, any) can be calculated on string fields. The statistics will be calculated on each area separately.
Note:
When count is applied to a field, it returns a count of the nonnull values present in the field. When any is applied to a string field, it returns a single string present in the field.
Aggregate Points allows you to optionally analyze using time steps. Each time step is analyzed independently of features outside of the time step. To use time stepping, your input data must be time-enabled and represent an instant in time. When time stepping is applied, output features will be time intervals represented by the fields START_DATETIME and END_DATETIME.
Learn more about time stepping
Aggregate Points requires that your area layer be in a projected coordinate system. If your data is not in a projected coordinate system and you do not set a projected processing coordinate system, a projection will be picked based on the extent of the data you are analyzing.
If Use current map extent is checked, only the features that are visible within the current map extent will be analyzed. If it's not checked, all input features in the input layer will be analyzed, even if they are outside the current map extent.
Limitations
Inputs must include a point layer. The area to aggregate into must be a provided area layer or bins. Lines and areas cannot be aggregated into areas using the Aggregate Points tool.
How Aggregate Points works
Equations
Variance is calculated using the following equation:
Standard deviation is calculated as the square root of the variance.
Calculations
Point layers are summarized using only the point features intersecting the input boundary. The results are displayed in blue and can be symbolized using graduated symbols on the calculated statistics.
The following figure and table illustrate the statistical calculations of a point layer within district boundaries. The Population field was used to calculate the statistics (Count,Sum, Minimum, Maximum, Range, Mean, Standard Deviation, and Variance) for the layer. The Type field was used to calculate the statistics (Count and Any) for the layer.
![Aggregating a point layer Aggregating a point layer](GUID-9EF6C446-BC2E-419B-B115-5E31C6042B14-web.png)
Numeric statistic | Results District A |
---|---|
Count | Count of:
|
Sum |
|
Minimum | Minimum of:
|
Maximum | Maximum of:
|
Average |
|
Variance | ![]()
|
Standard Deviation | ![]()
|
String statistic | Results District A |
---|---|
Count |
|
Any | = Secondary School |
The count statistic (for strings and numeric fields) counts the number of nonnull values. The count of the following values equals 5: [0, 1, 10, 5, null, 6] = 5. The count of this set of values equals 3: [Primary, Primary, Secondary, null] = 3.
A real-life scenario in which this analysis could be used is in determining the total number of students in each school district. Each point represents a school. The Type field gives the type of school (elementary, middle school, or secondary), and a student population field gives the number of students enrolled at each school. The calculations and results are given for District A in the table above. From the results, you can see that District A has 2,568 students. When running the Aggregate Points tool, the results would also be given for District B.
ArcGIS API for Python example
The Aggregate Points tool is available through ArcGIS API for Python.
This example aggregates a crime dataset into an area layer of census tracts. It calculates the number of officers on site for each polygon.# Import the required ArcGIS API for Python modules
import arcgis
from arcgis.gis import GIS
from arcgis.geoanalytics import summarize_data
# Connect to your ArcGIS Enterprise portal and confirm that GeoAnalytics is supported
portal = GIS("https://myportal.domain.com/portal", "gis_publisher", "my_password", verify_cert=False)
if not portal.geoanalytics.is_supported():
print("Quitting, GeoAnalytics is not supported")
exit(1)
# Find the big data file share dataset you'll use for analysis
search_result = portal.content.search("", "Big Data File Share")
# Look through the search results for a big data file share with the matching name
bdfs_search = next(x for x in search_result if x.title == "bigDataFileShares_myBigDataFileShare")
# Look through the big data file share for a dataset called Crimes
crime_data = next(x for x in bdfs_search.layers if x.properties.name == "Crimes")
# Find a feature layer named Census_Tracts in your ArcGIS Enterprise portal
census_tract_search_result = portal.content.search("Census_Tracts", "Feature Layer")
census_tract_layer = census_tract_search_result[0].layers[0]
# Set the environment settings for this tool to run
arcgis.env.verbose = True
# Run the Aggregate Points tool
crime_data_aggregate = summarize_data.aggregate_points(point_layer = crime_data,
polygon_layer = census_tract_layer,
summary_fields = [{'statisticType' : 'Sum',
'onStatisticField' : 'OfficersOnSite'}],
output_name = 'Crime_Data_Aggregated')
# Visualize the tool results if you are running Python in a Jupyter Notebook
processed_map = portal.map('MyCity, State', 10)
processed_map.add_layer(crime_data_aggregate)
processed_map
Similar tools
Use Aggregate Points to summarize points within areas. Other tools may be useful in solving similar but slightly different problems.
Map Viewer Classic analysis tools
If you are trying to summarize lines or areas into areas or bins, use the GeoAnalytics Tools Summarize Within.
If you are trying to summarize points, lines, or areas using different spatial relationships, use the GeoAnalytics Tools Join Features.
If you are trying to summarize lines or areas, use the standard tool Summarize Within.
If you would like to aggregate points into areas using the standard analysis tools, see Aggregate Points.
ArcGIS Pro analysis tools
The GeoAnalytics Tools Aggregate Points is available in ArcGIS Pro.
Aggregate Points performs the functions of the Spatial Join and Summary Statistics tools.