Label | Explanation | Data Type |
Input Features | The point, line, or polygon features that will be buffered and those buffers 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, the 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 | Defines what kind of distance measurement to use in generating buffer areas around the input features. Both driving distance and driving time use the road network and honor such restrictions as one-way streets. Driving time honors the current posted speed limits.
| String |
Distances | Distance values 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 enter will be summarized. Multiple values can be specified. One area around each input feature will be generated for each distance. | Double |
Distance Units
(Optional) | The units of the distance values.
| String |
Time of Day (Optional) | Specify whether travel times should consider traffic conditions. 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) | The time zone 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) | Determines if 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 you want to calculate 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. Statistic types include the following:
| Value Table |
Add shape summary attributes (Optional) | Determines if the output feature class will contain attributes for the number of points, length of lines, and area of polygon features summarized in each input feature buffer.
| Boolean |
Shape Unit
(Optional) | The unit in which to calculate shape summary attributes. If the input summary features are points, no shape unit is used, since only the count of points within each input feature buffer is added.
| String |
Group Field (Optional) | Attribute field from the input summary features 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 you choose a group field, an additional output grouped table will be created and its location must be specified. This output grouped table is required when using a group field. | Field |
Add minority and majority attributes (Optional) | This option is only enabled if you have selected a group field. It allows you to determine which group field value is the minority (least dominant) and the majority (most dominant) within each input feature buffer.
| Boolean |
Add group percentages (Optional) | This option is only enabled if you have selected a group field. It allows you to determine the percentage of each attribute value within each group.
| Boolean |
Output Grouped Table (Optional) | If a group field is specified, the output grouped table is required. An output table that includes summary fields for each group of summary features for each input feature buffer. 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 (within 5 kilometers). Drive-time and drive distance measurements require that you are logged in to an ArcGIS Online organizational account with Network Analysis privileges, and they consume credits.
Example scenarios using Summarize Nearby:
- Calculate the total population within 5 minutes of driving time of a proposed new store location.
- Calculate the number of freeway access ramps within a 1-mile driving 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 Within and Summarize Nearby tools are conceptually the same. With the Summarize Within tool you can summarize features within existing polygons, whereas with the Summarize Nearby tool you can generate areas around points, lines, or polygons, and summarize features within those derived areas.
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 an attribute Crime_type with five different crime types. Each unique crime type forms a group, and the statistics you choose will be calculated for each unique value of Crime_type.
License:
To use the drive-time and drive distance measurement options you must be logged in to an ArcGIS Online organizational account with Network Analysis privileges. Each time the tool runs successfully, service credits are debited from your subscription based on the service used and the results returned from the service. The ArcGIS Online service credits page provides details about service 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 and those buffers 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, the 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 | Defines what kind of distance measurement to use in generating buffer areas around the input features. Both driving distance and driving time use the road network and honor such restrictions 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 logged in to an ArcGIS Online organizational account with Network Analysis privileges. Each time the tool runs successfully, service credits are debited from your subscription based on the service used and the results returned from the service. The ArcGIS Online service credits page provides details about service credits. All distance types except straight-line distance use ArcGIS Online routing and network services.
| String |
distances [distance,...] | Distance values 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 enter will be summarized. Multiple values can be specified. One area around each input feature will be generated for each distance. | Double |
distance_units (Optional) | The units of the distance values.
| String |
time_of_day (Optional) | Specify whether travel times should consider traffic conditions. 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) | The time zone for the specified time of day. Time zones can be specified in local time or Coordinated Universal Time (UTC).
| String |
keep_all_polygons (Optional) | Determines if 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 you want to calculate 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. Statistic types include the following:
| Value Table |
sum_shape (Optional) | Determines if the output feature class will contain attributes for the number of points, length of lines, and area of polygon features summarized in each input feature buffer.
| Boolean |
shape_unit (Optional) | The unit in which to calculate shape summary attributes. If the input summary features are points, no shape unit is used, 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) | Attribute field from the input summary features 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 you choose a group field, 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) | This option is only enabled if you have selected a group field. It allows you to determine which group field value is the minority (least dominant) and the majority (most dominant) within each input feature buffer.
| Boolean |
add_group_percent (Optional) | This option is only enabled if you have selected a group field. It allows you to determine the percentage of each attribute value within each group.
| Boolean |
Output_Grouped_Table (Optional) | If a group field is specified, the output grouped table is required. An output table that includes summary fields for each group of summary features for each input feature buffer. 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.SummarizeNearby_analysis("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.SummarizeNearby_analysis(newStore, censusInfo, outFeatureClass,
distanceType, distance, distanceUnit,
time, timeZone, keepPolys, sumFields,
addShapeSum)
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes