获得 Business Analyst 许可后可用。
描述
Calculates the amount of overlap between two or more polygons. Overlap refers to the extent of the polygons beyond intersection.
An optional report can be created detailing overlapped statistics.
插图
使用方法
Metrics describing the cannibalized areas are included as attributes in the output feature class and in an optional report.
You can select demographic and lifestyle variables from the Data Browser to return additional fields in the output that define proportions in the affected polygons.
The output attribute table includes a record for each occurrence of overlap between input polygons.
By default, four metrics compare proportions of cannibalized area and are returned as individual fields in the output:
- A1—Proportion of area: ID 1 to ID 2 (area of polygon ID1 / area of polygon ID2)
- A2—Proportion of area in overlap (area of polygon ID1 and polygon ID2 intersection / area of polygon ID1 and polygon ID2 union)
- A3—Proportion of area: ID 1 within ID 2 (area of polygon ID1 and polygon ID2 intersection / area of polygon ID1)
- A4—Proportion of area: ID 2 within ID 1 (area of polygon ID1 and polygon ID2 intersection / area of polygon ID2)
Variables can be selected from the data browser to be included in the output as additional metrics.
If additional metrics are selected, five additional output fields are returned. The first field contains the value of the variable within the area of overlap. The following four follow the pattern of the standard metrics but use variable values instead of area.
Using current year population as an example, the five additional metrics fields would be as follows:
- populationtotals_totpop_cy—Population within area of overlap
- populationtotals_totpop_cy_A1—Proportion of population: ID 1 to ID 2
- populationtotals_totpop_cy_A2—Proportion of population in overlap
- populationtotals_totpop_cy_A3—Proportion of population: ID 1 within ID 2
- populationtotals_totpop_cy_A4—Proportion of population: ID 2 within ID 2
If polygons do not overlap, the output feature class will contain no geometry or records. The output feature class only contains the overlapping geometry from the input.
Polygons must be from a single feature class. Multiple feature classes can be merged into a single feature class using the Merge tool.
语法
arcpy.ba.MeasureCannibalization(in_features, area_id_field, area_description_field, out_feature_class, {store_id_field}, {create_report}, {report_title}, {report_folder}, {report_format}, {variables})
参数 | 说明 | 数据类型 |
in_features | The input polygon features to be analyzed for overlap. | Feature Layer |
area_id_field | The field that uniquely identifies each feature in the input layer. | Field |
area_description_field | The field that describes each feature in the input layer. | Field |
out_feature_class | The output feature class that will contain the areas of overlap found in the input layer. | Feature Class |
store_id_field (可选) | The unique ID that associates a store with each polygon when the inputs are trade areas. | Field |
create_report (可选) | Specifies whether a report will be generated.
| Boolean |
report_title (可选) | The title of the report. The default value is Measure Cannibalization (Measure Cannibalization in Python). | String |
report_folder (可选) | The output location where the report will be saved. | Folder |
report_format [report_format,...] (可选) | The output format or formats of the report. | String |
variables [variables,...] (可选) | One or more variables that will be used to calculate additional cannibalization metrics—for example, the total number of people and households in intersection areas, or the percentage of the total number of people and households in a trade area falling into cannibalization area. | String |
派生输出
名称 | 说明 | 数据类型 |
output_report | The output report file or files. | File |
代码示例
The following Python window script demonstrates how to use the MeasureCannibalization tool.
import arcpy
arcpy.ba.MeasureCannibalization("SF_Stores_Rings", "AREA_ID", "AREA_DESC",
r"C:\ MyProject1\MyProject1.gdb\SF_Stores_RIngs_MeasureCannibalization",
"STORE_ID", "CREATE_REPORT",
"Measure Cannibalization",
r"C:\ MyProject1\MeasureCannibalization", "PDF")
许可信息
- Basic: 需要 Business Analyst
- Standard: 需要 Business Analyst
- Advanced: 需要 Business Analyst