Summarize Points Report (Business Analyst)
摘要
Aggregates data from a point layer (such as a customer layer) to a polygon layer (such as a trade area).
用法
-
This tool allows you to generate trade areas with appended customer or store-based data.
-
Appended values must be volumetric/numeric.
-
All values appended will be summed.
-
Do not append medians, means, or averages.
-
You can generate a report or a mapping layer with the selected appended values attributed.
-
The mapping output will be thematically mapped based on the point count (that is, the number of points that fall within each polygon).
语法
参数 | 说明 | 数据类型 |
InputPointLayer |
The point layer containing the data to be appended to the boundary layer. | Feature Layer |
InputBoundaryLayer |
The boundary layer that will inherit the selected attributes of the point layer. | Feature Layer |
IDField |
The ID field of the boundary layer. | Field |
NameField |
The name field associated with the boundary layer. | Field |
SummarizePointsFields [SummarizePointsFields,...] |
The fields (or attributes) of the point layer that will be appended and summed to the boundary layer. | Field |
UseSelectedFeatures (可选) |
Uses selected points to summarize to the boundary layer.
| Boolean |
UseSelectedBoundaries (可选) |
Uses the selected boundaries for the point summarization.
| Boolean |
CreateReport (可选) |
Generates a report.
| Boolean |
ReportTitle (可选) |
The descriptive title on the output report. | String |
ReportFile (可选) |
Determines the directory the Summarize Points report will be saved to. | Folder |
CreateFeatureClass (可选) |
Generates a new boundary layer with the point data summarizations appended.
| Boolean |
OutputFeatureClass (可选) |
Determines the directory the new boundary layer will be saved to. | Feature Class |
ReportFormats [ReportFormats,...] (可选) |
Select the desired report output format
| String |
代码实例
# Name: SummarizePoints.py
# Description: Summarizes sales data to a trade area in the San Francisco market.
# Author: Esri
# Import system modules
import arcpy
arcpy.AddToolbox("C:\Program Files (x86)\ArcGIS\Desktop10.2\Business Analyst\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")
try:
# Acquire extension license
arcpy.CheckOutExtension("Business")
# Define input and output parameters for the Summarize Points Report tool
PointInput = "C:/My Output Data/Projects/Default Project/CustLayers/sf_custs/CustomerLayer.shp"
Boundary = "C:/My Output Data/Projects/Default Project/TradeAreas/Sub-geography/TradeArea.shp"
Id = "ID"
Name = "NAME"
Fields = "SALES"
Report = "SanFranBGs"
Output = "C:/My Output Data/Projects/Default Project/Reports/SummarizePoints_0/Report.rpt"
# Create the Summarize Points report
arcpy.SummarizePoints_ba(PointInput, Boundary, Id, Name, Fields, "false", "false", "true", Report, Output)
# Release extension license
arcpy.CheckInExtension("Business")
except:
print arcpy.GetMessages(2)