Label | Explanation | Data Type |
Input Features | The point, line, or polygon features that will be buffered. Those buffers will be used to summarize the input summary features. | Feature Layer |
Input Summary Features | The point, line, or polygon features that will be summarized. | Feature Layer |
Output Feature Class | The output polygon feature class containing the buffered input features, attributes of the input features, and new attributes about the number points, length of lines, and area of polygons inside each buffer and statistics about those features. | Feature Class |
Distance Measurement | Specifies the distance measurement type that will be used to generate buffer areas. Both driving distance and driving time will use the road network and honor restrictions such as one-way streets. Driving time honors the current posted speed limits. To use the drive-time and drive-distance measurement options, you must be signed in to an ArcGIS Online organizational account with Network Analysis privileges. Each time the tool runs successfully, credits are debited from your subscription based on the service used and the results returned from the service. The Credits page provides details about credits. All distance types except straight-line distance use ArcGIS Online routing and network services.
| String |
Distances | Distance values that will define a search distance (for straight-line, driving, trucking, or walking distance) or travel time (for driving, trucking, or walking time). Features that are within (or equal to) the distances you provide will be summarized. Multiple values can be specified. One area around each input feature will be generated for each distance. | Double |
Distance Units
(Optional) | Specifies the unit that will be used for the distance values.
| String |
Time of Day (Optional) | The date or time when traffic conditions will be considered during travel time. Traffic conditions, especially in urbanized areas, can significantly impact the area covered within a specified travel time. If no date or time is specified, the distance covered during a specified travel time will not be impacted by traffic. Traffic conditions may be live or typical (historical) based on the date and time specified for this parameter. Esri saves live traffic data for 12 hours and references predictive data extending 12 hours into the future. If the time and date you specify is within the 24-hour time window, live traffic is used. If it is outside the time window, typical or historic traffic is used. | Date |
Time Zone (Optional) | Specifies the time zone that will be used for the specified time of day. Time zones can be specified in local time or coordinated universal time (UTC).
| String |
Keep polygons with no points (Optional) | Specifies whether all buffers of the input features or only those intersecting or containing at least one input summary feature will be copied to the output feature class.
| Boolean |
Summary Fields (Optional) | A list of attribute field names from the input summary features and statistical summary types that will be calculated for those attribute fields for all points within each input feature buffer. Summary fields must be numeric. Text and other attribute field types are not supported. The following statistic types are supported:
| Value Table |
Add shape summary attributes (Optional) | Specifies whether attributes for the number of points, length of lines, and area of polygon features summarized in each input feature buffer (shape summary attributes) will be added to the output feature class.
| Boolean |
Shape Unit
(Optional) | Specifies 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 within each input feature buffer is added. If the input summary features are lines, specify a linear unit. If the input summary features are polygons, specify an areal unit.
| String |
Group Field (Optional) | The attribute field from the input summary features that will be 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, an additional output grouped table will be created and its location must be specified. The Output Grouped Table parameter is required when using a group field. | Field |
Add minority and majority attributes (Optional) | Specifies whether minority (least dominant) and majority (most dominant) group field values within each input feature buffer will be added to the output. This parameter is active if you specified a Group Field parameter value.
| Boolean |
Add group percentages (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.
| Boolean |
Output Grouped Table (Optional) | An output table that includes summary fields for each group of summary features for each input feature buffer. If a group field is specified, the output grouped table is required. The table will have the following attribute fields:
| Table |
Summary
Finds features that are within a specified distance of features in the input layer and calculates statistics for the nearby features. Distance can be measured as a straight-line distance, a drive-time distance (for example, within 10 minutes), or a drive distance (for example, within 5 kilometers). For drive-time and drive-distance measurements, you must be signed in to an ArcGIS Online organizational account with Network Analysis privileges. Both measurement options consume credits.
The following are example scenarios using Summarize Nearby:
- Calculate the total population within a 5minute drive time of a proposed new store location.
- Calculate the number of freeway access ramps within a 1-mile drive distance of a proposed new store location to use as a measure of store accessibility.
Illustration
Usage
You can specify multiple distances and each distance value will result in one area generated around each input feature. For example, if you specify two distances, each input feature will be buffered twice, and the output will contain two areas for that input feature, one for each distance.
The Summarize Nearby and Summarize Within tools are conceptually the same. Using the Summarize Nearby tool, you can generate areas around points, lines, or polygons, and summarize features within those derived areas. Using the Summarize Within tool, you can summarize features within existing polygons.
You can create groups by specifying a group field from the input points. For example, if you are summarizing crimes within a distance of neighborhood boundaries, you may have a Crime_type attribute with five crime types. Each unique crime type forms a group, and the statistics you choose will be calculated for each unique Crime_type value.
Null values are excluded from all statistical calculations. For example, the average of 10, 5, and a null value is 7.5 ((10+5)/2).
License:
To use the drive-time and drive distance measurement options, you must be signed in to an ArcGIS Online organizational account with Network Analysis privileges. Each time the tool runs successfully, credits are debited from your subscription based on the service used and the results returned from the service. The Credits page provides details about credits.
Parameters
arcpy.analysis.SummarizeNearby(in_features, in_sum_features, out_feature_class, distance_type, distances, {distance_units}, {time_of_day}, {time_zone}, {keep_all_polygons}, {sum_fields}, {sum_shape}, {shape_unit}, {group_field}, {add_min_maj}, {add_group_percent}, {Output_Grouped_Table})
Name | Explanation | Data Type |
in_features | The point, line, or polygon features that will be buffered. Those buffers will be used to summarize the input summary features. | Feature Layer |
in_sum_features | The point, line, or polygon features that will be summarized. | Feature Layer |
out_feature_class | The output polygon feature class containing the buffered input features, attributes of the input features, and new attributes about the number points, length of lines, and area of polygons inside each buffer and statistics about those features. | Feature Class |
distance_type | Specifies the distance measurement type that will be used to generate buffer areas. Both driving distance and driving time will use the road network and honor restrictions such as one-way streets. Driving time honors the current posted speed limits. To use the drive-time and drive-distance measurement options, you must be signed in to an ArcGIS Online organizational account with Network Analysis privileges. Each time the tool runs successfully, credits are debited from your subscription based on the service used and the results returned from the service. The Credits page provides details about credits. All distance types except straight-line distance use ArcGIS Online routing and network services.
| String |
distances [distance,...] | Distance values that will define a search distance (for straight-line, driving, trucking, or walking distance) or travel time (for driving, trucking, or walking time). Features that are within (or equal to) the distances you provide will be summarized. Multiple values can be specified. One area around each input feature will be generated for each distance. | Double |
distance_units (Optional) | Specifies the unit that will be used for the distance values.
| String |
time_of_day (Optional) | The date or time when traffic conditions will be considered during travel time. Traffic conditions, especially in urbanized areas, can significantly impact the area covered within a specified travel time. If no date or time is specified, the distance covered during a specified travel time will not be impacted by traffic. Traffic conditions may be live or typical (historical) based on the date and time specified for this parameter. Esri saves live traffic data for 12 hours and references predictive data extending 12 hours into the future. If the time and date you specify is within the 24-hour time window, live traffic is used. If it is outside the time window, typical or historic traffic is used. | Date |
time_zone (Optional) | Specifies the time zone that will be used for the specified time of day. Time zones can be specified in local time or coordinated universal time (UTC).
| String |
keep_all_polygons (Optional) | Specifies whether all buffers of the input features or only those intersecting or containing at least one input summary feature will be copied to the output feature class.
| Boolean |
sum_fields [[summary_field, statistic_type],...] (Optional) | A list of attribute field names from the input summary features and statistical summary types that will be calculated for those attribute fields for all points within each input feature buffer. Summary fields must be numeric. Text and other attribute field types are not supported. The following statistic types are supported:
| Value Table |
sum_shape (Optional) | Specifies whether attributes for the number of points, length of lines, and area of polygon features summarized in each input feature buffer (shape summary attributes) will be added to the output feature class.
| Boolean |
shape_unit (Optional) | Specifies 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 within each input feature buffer is added. If the input summary features are lines, specify a linear unit. If the input summary features are polygons, specify an areal unit.
| String |
group_field (Optional) | The attribute field from the input summary features that will be 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, an additional output grouped table will be created and its location must be specified in the out_grouped_table parameter. | Field |
add_min_maj (Optional) | Specifies whether minority (least dominant) and majority (most dominant) group field values within each input feature buffer will be added to the output. This parameter is enabled if you specified a group_field parameter value.
| Boolean |
add_group_percent (Optional) | Specifies whether a percentage of each attribute value in each group will be added to the output. This parameter allows you to determine the percentage of each attribute value in each group. This parameter is enabled if you specified a group_field parameter value.
| Boolean |
Output_Grouped_Table (Optional) | An output table that includes summary fields for each group of summary features for each input feature buffer. If a group field is specified, the output grouped table is required. The table will have the following attribute fields:
| Table |
Code sample
The following Python window script demonstrates how to use the SummarizeNearby function.
import arcpy
arcpy.env.workspace = "C:/data/city.gdb"
arcpy.analysis.SummarizeNearby("new_store_location", "census_blocks",
"new_store_population", "STRAIGHT_LINE", "1;2",
"Miles", "", "", "KEEP_ALL", "Pop2014 SUM")
The following stand-alone script is an example of how to use the SummarizeNearby function in a scripting environment.
# Description: Use SummarizeNearby to summarize population
# import system modules
import arcpy
# Set environment settings
arcpy.env.workspace = "C:/data/city.gdb"
# Set local variables
newStore = "new_store_location"
censusInfo = "census_blocks"
outFeatureClass = "crimes_aggregated"
distanceType = "TRAVEL_TIME"
distance = "10;20"
distanceUnit = "Minutes"
time = "10/15/2014 2:14:19 PM"
timeZone = "GEOLOCAL"
keepPolys = True
sumFields = [["Pop2010", "Sum"],["OWNERS", "Sum"]]
addShapeSum = True
arcpy.analysis.SummarizeNearby(newStore, censusInfo, outFeatureClass,
distanceType, distance, distanceUnit,
time, timeZone, keepPolys, sumFields,
addShapeSum)
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes