Skip To Content

Aggregate Points

Summary

Aggregates points into polygon features or bins. At all locations where points exist, a polygon is returned with a count of points as well as optional statistics.

Learn more about how time stepping works

Illustration

Aggregate Points tool
Examples of aggregating points into polygons (first row), time-enabled points into polygons with time stepping (second row), points into bins (third row), and points into bins with time stepping (fourth row).

Usage

  • There are two ways to specify into which areas to aggregate points:

    • Use a polygon layer.
    • Use a square or hexagonal bin of a specified size that is generated when analysis is run.

  • Aggregate Points requires that the Point Layer is projected or that the output coordinate system is set to a Projected Coordinate System.

  • The output feature layer is always a polygon layer, and only the polygons where points occur are returned.

  • If time is enabled on your input, you may apply time stepping to your analysis. Learn more about time stepping

  • If you specify a time-step interval, time-step repeat, or reference time, and time is not enabled on your data, the tool will result in an error.

  • When input features are analyzed using time steps, each time step is analyzed independent of features outside of the time step.

  • The Time Step Reference parameter can be a date and time value or solely a date value; it cannot be solely a time value.

  • This geoprocessing tool is powered by ArcGIS GeoAnalytics Server. Analysis is completed on your GeoAnalytics Server, and results are stored in your content in ArcGIS Enterprise.

  • When running GeoAnalytics Tools, the analysis is completed on the GeoAnalytics Tools. For optimal performance, data should be available to the GeoAnalytics Tools through feature layers hosted on your ArcGIS Enterprise portal or through big data file shares. Data that is not local to your GeoAnalytics Tools will be moved to your GeoAnalytics Tools before analysis begins. This means that it will take longer to run a tool, and in some cases, moving the data from ArcGIS Pro to your GeoAnalytics Tools may fail. The threshold for failure depends on your network speeds, as well as the size and complexity of the data. Therefore, it is recommended that you always share your data or create a big data file share.

    Learn more about sharing data to your portal

    Learn more about creating a big data file share through Server Manager

  • Similar analysis can also be completed using the following:

Syntax

AggregatePoints_geoanalytics (point_layer, output_name, polygon_or_bin, {polygon_layer}, {bin_type}, {bin_size}, {time_step_interval}, {time_step_repeat}, {time_step_reference}, {summary_fields}, {data_store})
ParameterExplanationData Type
point_layer

The point features to be aggregated into polygons or bins.

Feature Set
output_name

The name of the output feature service.

String
polygon_or_bin

What the point_layer will be aggregated into.

  • POLYGONSThe points layer will be aggregated into a polygons dataset.
  • BINSThe points will be aggregated into square or hexagonal bins that are generated when the tool is run.
String
polygon_layer
(Optional)

The polygon features into which the input points will be aggregated.

Feature Set
bin_type
(Optional)

Bin shape that will be generated to aggregate points into.

  • SQUARESquare bins where the bin_size represents the height of a square. This is the default.
  • HEXAGONHexagonal bins where the bin_size represents the height between two parallel sides.
String
bin_size
(Optional)

The distance interval that represents the bin_size and units into which the point_layer will be aggregated. The distance interval must be a linear unit.

Linear Unit
time_step_interval
(Optional)

A value that specifies the duration of the time step. This option is only available if the input points are time enabled and represent an instant in time.

Time stepping can only be applied if time is enabled on the input. For more information on how time stepping works, see How time stepping works with GeoAnalytics Tools.

Time unit
time_step_repeat
(Optional)

A value that specifies how often the time-step interval occurs. This option is only available if the input points are time enabled and represent an instant in time.

Time unit
time_step_reference
(Optional)

A date that specifies the reference time with which to align the time steps. The default is January 1, 1970, at 12:00 a.m. This option is only available if the input points are time enabled and represent an instant in time.

Date
summary_fields
[summary_fields,...]
(Optional)

The statistics that will be calculated on specified fields.

  • COUNT—Calculates the number of nonnull values. It can be used on numeric fields or strings. The count of [null, 0, 2] is 2.
  • SUM—The sum of numeric values in a field. The sum of [null, null, 3] is 3.
  • MEAN—The mean of numeric values. The mean of [0,2, null] is 1.
  • MIN—The minimum value of a numeric field. The minimum of [0, 2, null] is 0.
  • MAX—The maximum value of a numeric field. The maximum value of [0, 2, null] is 2.
  • STDDEV—The standard deviation of a numeric field. The standard deviation of [1] is null. The standard deviation of [null, 1,1,1] is 1.
  • VAR—The variance of a numeric field in a track. The variance of [1] is null. The variance of [null, 1,1,1] is 1.
  • RANGE—The range of a numeric field. This is calculated as the minimum value subtracted from the maximum value. The range of [0, null, 1] is 1. The range of [null, 4] is 0.
  • ANY—This is a sample string from a field of type string.

Value Table
data_store
(Optional)

Specifies the ArcGIS Data Store where the output will be saved. The default is SPATIOTEMPORAL_DATA_STORE. All results stored to the SPATIOTEMPORAL_DATA_STORE will be stored in WGS84. Results stored in a RELATIONAL_DATA_STORE will maintain their coordinate system.

  • SPATIOTEMPORAL_DATA_STOREOutput will be stored in a spatiotemporal big data store. This is the default.
  • RELATIONAL_DATA_STOREOutput will be stored in a relational data store.
String

Derived Output

NameExplanationData Type
output

The aggregated polygon features or bins.

Feature Set

Code sample

AggregatePoints (Python window)

The following Python window script demonstrates how to use the AggregatePoints tool.

#-------------------------------------------------------------------------------
# Name: AggregatePoints.py
# Description: Aggregate 311 events into 1 KM Bins.
#
# Requirements: ArcGIS GeoAnalytics Server

# Import system modules
import arcpy

# Set local variables
inFeatures = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/SF311/FeatureServer/0"
summaryFields = ["Year", "Beat"]
summaryStatistics = [["Arrest", "COUNT"], ["District", "COUNT"]]
outFS = "AggregateWildfires"
dataStore = "SPATIOTEMPORAL_DATA_STORE"

# Execute Aggregate Points
arcpy.geoanalytics.AggregatePoints(inFeatures, outFS, "BIN", None, "HEXAGON", 
                                   "1 Kilometers", None, None, None, None, 
                                   dataStore)

Environments

Output Coordinate System

The coordinate system that will be used for analysis. Analysis will be completed on the input coordinate system unless specified by this parameter. For GeoAnalytics Tools, final results will be stored in the spatiotemporal data store in WGS84.

Licensing information

  • Basic: Requires ArcGIS GeoAnalytics Server
  • Standard: Requires ArcGIS GeoAnalytics Server
  • Advanced: Requires ArcGIS GeoAnalytics Server

Related topics