Summary
Aggregates points into polygon features or bins. A polygon is returned with a count of points as well as optional statistics at all locations where points exist.
Illustration
Usage
The two ways to specify the areas into which the points will be aggregated are as follows:
- Use a polygon layer.
- Use a square or hexagonal bin of a specified size that is generated when the analysis is run.
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.
Aggregate Points requires that the Point Layer is projected or that the output coordinate system is set to 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 assigned based on the extent of the data you are analyzing.
The output feature layer is always a polygon layer. Only polygons that contain points will be returned, and resulting polygons will be completely removed from the result layer.
The most basic aggregations will calculate a count of the number of points in each polygon. 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. If you specify a statistic that is not valid (mean of a string field), it will be skipped.
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.
If time is enabled on the input, you can apply time stepping to your analysis. Each time step is analyzed independent of features outside 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 START_DATETIME and END_DATETIME fields.
If you specify a time-step interval, time-step repeat, or reference time, and time is not enabled on the data, the tool will result in an error.
The Time Step Reference parameter can be a date and time value or solely a date value; it cannot be solely a time value.
The following fields are included in the output features:
Field name Description count
The count of features within each polygon.
statistic_fieldname
Specified statistics will each create an attribute field, named in the following format: statistic_fieldname. For example, the maximum and standard deviation of the id field are MAX_id and SD_id, respectively.
start_date
When time stepping is specified, output polygons will have a time interval. This field represents the start time.
end_date
When time stepping is specified, output polygons will have a time interval. This field represents the end time.
You can improve the performance of the Aggregate Points tool by using one or more of the following tips:
- Set the extent environment so you only analyze data of interest.
- Larger bins will perform better than smaller bins. If you are unsure about which size to use, start with a larger bin to prototype.
- Similar to bins, larger time steps will perform better than smaller time steps.
- Use data that is local to where the analysis is being run.
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 Server Tools, the analysis is completed on the GeoAnalytics Server. For optimal performance, make data available to the GeoAnalytics Server through feature layers hosted on your ArcGIS Enterprise portal or through big data file shares. Data that is not local to your GeoAnalytics Server will be moved to your GeoAnalytics Server 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 Server 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 Aggregate Points tool in the Standard Feature Analysis toolbox.
Syntax
AggregatePoints(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})
Parameter | Explanation | Data 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 | Specifies how the point_layer will be aggregated.
| String |
polygon_layer (Optional) | The polygon features into which the input points will be aggregated. | Feature Set |
bin_type (Optional) | Specifies the bin shape that will be generated to hold the aggregated points.
| 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 parameter 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. | Time Unit |
time_step_repeat (Optional) | A value that specifies how often the time-step interval occurs. This parameter 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 parameter 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.
| 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 in the SPATIOTEMPORAL_DATA_STORE will be stored in WGS84. Results stored in a RELATIONAL_DATA_STORE will maintain their coordinate system.
| String |
Derived Output
Name | Explanation | Data Type |
output | The aggregated polygon features or bins. | Feature Set |
Code sample
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 in 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