Summarize Within (Standard Feature Analysis)

Summary

Finds the point, line, or polygon features (or portions of features) that are within the boundaries of polygons in another layer.

The following are example scenarios for the use of this tool:

  • For a layer of watershed boundaries and a layer of land-use boundaries by land-use type, calculate total acreage of land-use type for each watershed.
  • For a layer of parcels in a county and a layer of city boundaries, summarize the average value of vacant parcels within each city boundary.
  • For a layer of counties and a layer of roads, summarize the total mileage of roads by road type within each county.

Illustration

Summarize Within tool illustration

Usage

  • You can think of this tool as taking two layers and stacking them on top of each other. For example, the features in one of the layers, the input polygons layer, are all colored red. The other layer, the input summary features, can be any feature type—point, line, or polygon. After stacking these layers on top of each other, you look down through the stack and count the number of features in the input summary features layer that are within the polygons with the red boundaries (the input polygons). Not only can you count the number of features, you can calculate simple statistics about the attributes of the features in the input summary features layer, such as sum, mean, minimum, maximum, and so on.

Parameters

LabelExplanationData Type
Input Polygons

The features, or portions of features, from the Input Summary Features parameter value that are within the boundaries of these polygons will be summarized.

Feature Set
Input Summary Features

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

Feature Set
Output Name

The name of the output layer that will be created on your portal.

String
Add shape summary attributes
(Optional)

Specifies whether statistics will be calculated based on the shape of the Input Summary Features parameter value, such as the length of lines or areas of polygons of the input summary features within each input polygon.

  • Checked—Statistics will be calculated based on the shape summary attributes. This is the default.
  • Unchecked—Statistics will not be calculated based on the shape summary attributes.

Boolean
Shape Unit
(Optional)

Specifies the units that will be used for the shape summary.

When the input summary features are polygons, the valid options are acres, hectares, square meters, square kilometers, square feet, square yards, and square miles.

When the input summary features are lines, the valid options are miles, feet, kilometers, meters, and yards.

  • MilesThe units will be miles.
  • FeetThe units will be feet.
  • KilometersThe units will be kilometers.
  • MetersThe units will be meters.
  • YardsThe units will be yards.
  • AcresThe units will be acres.
  • HectaresThe units will be hectares.
  • Square metersThe units will be square meters.
  • Square kilometersThe units will be square kilometers.
  • Square feetThe units will be square feet.
  • Square yardsThe units will be square yards.
  • Square milesThe units will be square miles.
String
Summary Fields
(Optional)

A list of field names and statistical summary type that will be calculated for all points within each polygon. The count of points within each polygon is always returned.

The following statistic types are supported:

  • Sum—The total value will be calculated.
  • Minimum—The smallest value will be identified.
  • Max—The largest value will be identified.
  • Mean—The average or mean value will be calculated.
  • Standard deviation—The standard deviation will be calculated.

Value Table
Group By Field
(Optional)

A field from the input summary features that will be used to calculate statistics separately for each unique attribute value. For example, the Input Summary Features parameter value contain point locations of businesses that store hazardous materials, and the HazardClass field contains codes that describe the type of hazardous material stored. To calculate summaries by each unique value of the HazardClass field, use it as the group by field.

Field
Add minority and majority attributes
(Optional)

Specifies whether minority and majority fields will be added to the output.

This parameter only applies when using the Group By Field parameter.

  • Unchecked—Minority and majority fields will not be added to the output. This is the default.
  • Checked—The minority (least dominant) or the majority (most dominant) attribute values for each group field within each boundary will be calculated, and two new fields prefixed with Minority_ and Majority_ will be added to the output.

Boolean
Add group percentages
(Optional)

Specifies whether group percentage fields will be added to the output.

This parameter only applies when using the Group By Field parameter.

  • Unchecked—Percentage fields will not be added to the output. This is the default.
  • Checked—The percentage of each unique group value will be calculated for each input polygon, and percentage fields will be added to the output.

Boolean

Derived Output

LabelExplanationData Type
Output Feature Service

The output summarized layer.

Feature Set
Output Group Table

If a group by field was provided, the tool will output a table that contains the calculated statistics for each unique group.

Record Set

arcpy.sfa.SummarizeWithin(sumWithinLayer, summaryLayer, outputName, {sumShape}, {shapeUnits}, {summaryFields}, {groupByField}, {minorityMajority}, {percentShape})
NameExplanationData Type
sumWithinLayer

The features, or portions of features, from the summaryLayer parameter value that are within the boundaries of these polygons will be summarized.

Feature Set
summaryLayer

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

Feature Set
outputName

The name of the output layer that will be created on your portal.

String
sumShape
(Optional)

Specifies whether statistics will be calculated based on the shape of the summaryLayer parameter value, such as the length of lines or areas of polygons of the input summary features within each input polygon.

  • ADD_SHAPE_SUMStatistics will be calculated based on the shape summary attributes. This is the default.
  • NO_SHAPE_SUMStatistics will not be calculated based on the shape summary attributes.
Boolean
shapeUnits
(Optional)

Specifies the units that will be used for the shape summary.

When the input summary features are polygons, the valid options are acres, hectares, square meters, square kilometers, square feet, square yards, and square miles.

When the input summary features are lines, the valid options are miles, feet, kilometers, meters, and yards.

  • MILESThe units will be miles.
  • FEETThe units will be feet.
  • KILOMETERSThe units will be kilometers.
  • METERSThe units will be meters.
  • YARDSThe units will be yards.
  • ACRESThe units will be acres.
  • HECTARESThe units will be hectares.
  • SQUAREMETERSThe units will be square meters.
  • SQUAREKILOMETERSThe units will be square kilometers.
  • SQUAREFEETThe units will be square feet.
  • SQUAREYARDSThe units will be square yards.
  • SQUAREMILESThe units will be square miles.
String
summaryFields
[[Field, Statistic],...]
(Optional)

A list of field names and statistical summary type that will be calculated for all points within each polygon. The count of points within each polygon is always returned.

The following statistic types are supported:

  • SUM—The total value will be calculated.
  • MIN—The smallest value will be identified.
  • MAX—The largest value will be identified.
  • MEAN—The average or mean value will be calculated.
  • STD—The standard deviation will be calculated.

Value Table
groupByField
(Optional)

A field from the input summary features that will be used to calculate statistics separately for each unique attribute value. For example, the summaryLayer parameter value contain point locations of businesses that store hazardous materials, and the HazardClass field contains codes that describe the type of hazardous material stored. To calculate summaries by each unique value of the HazardClass field, use it as the group by field.

Field
minorityMajority
(Optional)

Specifies whether minority and majority fields will be added to the output.

This parameter only applies when using the groupByField parameter.

  • NO_MIN_MAJMinority and majority fields will not be added to the output. This is the default.
  • ADD_MIN_MAJThe minority (least dominant) or the majority (most dominant) attribute values for each group field within each boundary will be calculated, and two new fields prefixed with Minority_ and Majority_ will be added to the output.
Boolean
percentShape
(Optional)

Specifies whether group percentage fields will be added to the output.

This parameter only applies when using the groupByField parameter.

  • NO_PERCENTPercentage fields will not be added to the output. This is the default.
  • ADD_PERCENTThe percentage of each unique group value will be calculated for each input polygon, and percentage fields will be added to the output.
Boolean

Derived Output

NameExplanationData Type
outputLayer

The output summarized layer.

Feature Set
groupBySummaryLayer

If a group by field was provided, the tool will output a table that contains the calculated statistics for each unique group.

Record Set

Environments

Licensing information

  • Basic: Requires your account in ArcGIS Enterprise to have the Perform Analysis privilege
  • Standard: Requires your account in ArcGIS Enterprise to have the Perform Analysis privilege
  • Advanced: Requires your account in ArcGIS Enterprise to have the Perform Analysis privilege

Related topics