Summary
Finds features that are within a specified distance of features in the input layer.
Distance can be measured as a straight-line distance or by a specified travel mode. Statistics are then calculated for the nearby features, as in the following:
- 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
The Summarize Nearby tool requires two input layers: a layer from which distances will be measured and a layer to summarize. Both layers may be points, lines, or areas. The first input layer can contain up to 1,000 features.
The nearby distance can be based on a line distance or several different travel modes using time or distance as the measure. Travel modes are only enabled when the first input layer contains point features. You can create multiple output areas by inputting multiple distances or times.
Some travel modes have an option for using traffic conditions. When traffic conditions are used, they may be based on live conditions or typical conditions for a specified day of the week and time. Live traffic conditions can be offset up to 12 hours from the current time. Times for typical conditions can be set by 15-minute intervals for the entire day and night.
Travel modes can be configured by the administrator of your organization. The administrator can also add new travel modes or remove travel modes that are not necessary for your organization. The default distance measure will be in miles or kilometers, depending on the units setting in your profile.
Syntax
arcpy.sfa.SummarizeNearby(sumNearbyLayer, summaryLayer, outputName, nearType, {distances}, {units}, {timeOfDay}, {timeZoneForTimeOfDay}, {returnBoundaries}, {sumShape}, {shapeUnits}, {summaryFields}, {groupByField}, {minorityMajority}, {percentShape})
Parameter | Explanation | Data Type |
sumNearbyLayer | Point, line, or polygon features from which distances will be measured to features in the input summary layer. | Feature Set |
summaryLayer | Point, line, or polygon features. Features in this layer that are within the specified distance to features in the input nearby layer will be summarized. | Feature Set |
outputName | The name of the output layer to create on your portal. | String |
nearType | Defines what kind of distance measurement you want to use: straight-line distance or by measuring travel time or travel distance along a street network using various modes of transportation known as travel modes.
| String |
distances [distances,...] (Optional) | A list of double values that defines the search distance (for straight-line and distance-based travel modes) or time (for time-based travel modes). You can enter a single distance value or multiple values. Features that are within (or equal to) the distances you enter will be summarized. The units of the distance values is supplied by the units parameter. | Double |
units (Optional) | If the near type is straight-line or a distance-based travel mode, this is the linear unit to be used with the distance values specified in distances. Valid options include meters, kilometers, feet, yards, and miles. If the near type is a time-based travel mode, values include seconds, minutes, and hours.
| String |
timeOfDay (Optional) | Specify whether travel times should consider traffic conditions. To use traffic in the analysis, you must set the near type to a travel-time-based mode. The time of day value represents the time at which travel begins, or departs, from the input points. Two kinds of traffic are supported: typical and live. Typical traffic references travel speeds that are made up of historical averages for each 5-minute interval spanning a week. Live traffic retrieves speeds from a traffic feed that processes phone probe records, sensors, and other data sources to record actual travel speeds and predict speeds for the near future. To ensure the task uses typical traffic in locations where it is available, choose a time and day of the week and convert the day of the week to one of the following dates from 1990:
To use live traffic when and where it is available, choose a date and time within 12 hours of the current time. Esrisaves live traffic data for 12 hours and references predictive data extending 12 hours into the future. If the time and date you specify for this parameter is outside the 24-hour time window, or the travel time in the analysis continues past the predictive data window, the task falls back to typical traffic speeds. | Date |
timeZoneForTimeOfDay (Optional) | Specify the time zone or zones of the chosen time of day. There are two options: GeoLocal (default) and UTC.
| String |
returnBoundaries (Optional) | Specifies whether the input geometries will be returned or the straight-line or travel mode buffer geometry.
| Boolean |
sumShape (Optional) | Calculate statistics based on the shape of the input summary features, such as the length of lines or areas of polygons of the summary features within each polygon in the input summary layer.
| Boolean |
shapeUnits (Optional) | If summarizing the shape of the nearby features, specify the units of 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 meters, kilometers, feet, yards, and miles.
| String |
summaryFields [[Field, Statistic],...] (Optional) | A list of field names and statistical summary type that you wish to calculate for all points within each polygon. The count of points within each polygon is always returned. The following statistic types are supported:
| Value Table |
groupByField (Optional) | This is a field from the input summary features you can use to calculate statistics separately for each unique attribute value. For example, suppose the input summary features contain point locations of businesses that store hazardous materials, and one of the fields is HazardClass containing codes that describe the type of hazardous material stored. To calculate summaries by each unique value of HazardClass, use it as the group by field. | Field |
minorityMajority (Optional) | This only applies when using a group by field. If you specify ADD_MIN_MAJ, the minority (least dominant) or the majority (most dominant) attribute values for each group field within each boundary are calculated. Two new fields are added to the output layer prefixed with Majority_ and Minority_.
| Boolean |
percentShape (Optional) | This only applies when using a group by field. If checked, the percentage of each unique group value is calculated for each input nearby feature.
| Boolean |
Derived Output
Name | Explanation | Data Type |
resultLayer | The output summarized layer. | Feature Set |
groupBySummary | 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