Summarize Within

Title  Summarize Within

Summary

Overlays a polygon layer with another layer to summarize the number of points, length of the lines, or area of the polygons within each polygon, and calculate attribute field statistics about the features within the polygons.


Illustration

Summarize Within illustration

Usage

Syntax

Parameter Explanation
in_polygons

The polygons used to summarize the features, or portions of features, in the input summary layer.

in_sum_features

The point, line, or polygon features that will be summarized for each polygon in the input polygons.

out_feature_class

The output polygon feature class containing the same geometries and attributes as the input polygons with additional new attributes for the number points, length of lines, and area of polygons inside each input polygon and statistics about those features.

keep_all_polygons (Optional)

Specifies whether all input polygons or only those intersecting or containing at least one input summary feature will be copied to the output feature class.Checked—All input polygons will be copied to the output feature class. This is the default.Unchecked—Only input polygons that intersect or contain at least one input summary feature will be copied to the output feature class.

sum_fields (Optional)

A list of attribute field names from the input summary features, as well as statistical summary types that will be calculated for those attribute fields for all points in each polygon.Summary fields must be numeric. Text and other attribute field types are not supported.The following are the statistic types:Sum—The total value of all the points in each polygon will be calculated.Mean—The average of all the points in each polygon will be calculated.Min—The smallest value of all the points in each polygon will be identified.Max—The largest value of all the points in each polygon will be identified.Stddev—The standard deviation of all the points in each polygon will be calculated.

sum_shape (Optional)

Specifies whether attributes for the number of points, length of lines, and area of polygon features summarized in each input polygon will be added to the output.Checked—Shape summary attributes will be added to the output feature class. This is the default.Unchecked—Shape summary attributes will not be added to the output feature class.

shape_unit (Optional)

The unit that will be used when calculating shape summary attributes. If the input summary features are points, no shape unit is necessary, since only the count of points in each input polygon is added.If the input summary features are lines, specify a linear unit. If the input summary features are polygons, specify an areal unit.Meters—The unit will be meters.Kilometers—The unit will be kilometers.Feet—The unit will be feet.Yards—The unit will be yards.Miles—The unit will be miles.Acres—The unit will be acres.Hectares—The unit will be hectares.Square meters—The unit will be square meters.Square kilometers—The unit will be square kilometers.Square feet—The unit will be square feet.Square yards—The unit will be square yards.Square miles—The unit will be square miles.

group_field (Optional)

An attribute field from the input summary features that is used for grouping. Features that have the same group field value will be combined and summarized with other features with the same group field value.When a group field is specified, the Output Grouped Table parameter is required.

add_min_maj (Optional)

Specifies whether minority and majority fields will be added to the output. This parameter allows you to determine which group field value is the minority (least dominant) and the majority (most dominant) within each input polygon.This parameter is active if you specified a Group Field parameter value.Unchecked—Minority and majority fields will not be added to the output. This is the default.Checked—Minority and majority fields will be added to the output.

add_group_percent (Optional)

Specifies whether a percentage attribute field will be added to the output. This parameter allows you to determine the percentage of each attribute value in each group.This parameter is active if you specified a Group Field parameter value.Unchecked—A percentage attribute field will not be added to the output. This is the default.Checked—A percentage attribute field will be added to the output.

out_group_table (Optional)

An output table that includes summary fields for each group of summary features for each input polygon.The table will have the following attribute fields:Join_ID—An ID corresponding to an ID field added to the output feature classThe group fieldA shape summary fieldOne field for each of the summary fieldsPercentage fieldThis parameter is required when the Group Field parameter value is specified.

esri_out_feature_service_name (Optional)

The name of the optional feature service to create on the federated server containing the result of this tool. If no name is specified an output feature service will not be created.

Code Samples

Tags

count, inside, overlap, overlay, polygon, sum, summary

Credits

Use limitations