获得 Business Analyst 许可后可用。
摘要
Generates trade areas from the features of an input polygon layer that intersects a defined boundary layer.
Learn more about how Create Trade Area From Subgeography Layer works
用法
The spatial reference of the output feature class will be the same as the boundary layer.
The output feature class is based on a polygon-to-polygon selection and computes a geometric intersection of the boundary layer.
If the subgeography layer does not intersect the boundary layer, no output feature class is created.
A percent of overlap field is included in the output feature class. This will illustrate how much a feature in the subgeography layer is intersected by the boundary layer.
In most cases, the boundary layer will be a Business Analyst trade area. You can use this tool to determine the ZIP Codes (or other subgeography layers) that intersect your trade areas.
In ArcMap, trade areas will only be created for features that are within the active study area or analysis extent.
The Calculate Ratios option allows you to append the percentage by which your subgeographies will intersect your boundary layer. This tool uses the same methodology that Business Analyst uses to aggregate data to trade areas for reporting.
The Calculate Ratios option is commonly used when you need to determine how much a geography intersects a trade area. You can then take these percentages and apply them to an external database of like geographies to calculate how much of the data in your external database is within your trade area. For example, if you have database of customer volumetrics at the ZIP Code geography and you need to determine how much of these volumetrics are within a five-minute drive time, but you are required to keep the database outside of Business Analyst, this tool gives you that option. You need to make sure the subgeography IDs selected within Business Analyst match your external database. For example, if you choose ZIP Codes as your subgeography layer, then you would need to make sure your external database had five-digit ZIP Code IDs to accurately link the databases.
You have three options for ratios:
- All Ratios—The values calculated will contain percentages for Population, Housing Units, Households, and Business Points.
- Area Only—The percentage will only be calculated for area of the subgeographies that intersect the boundary layer.
- None—No percentages will be calculated.
语法
CreateTAFromSubgeography_ba (InputBoundaryLayer, InputBoundaryLayerIdFieldName, All_Or_Single_Or_Selected, InputSubgeographyLayer, InputSubgeographyLayerIdFieldName, InputSubgeographyLayerNameFieldName, OutputFeatureClass, InputSubgeographyCalcRatiosOption, InputSubgeographySpatialRshipOption, {ByID_Or_ByName}, {Single_Site})
参数 | 说明 | 数据类型 |
InputBoundaryLayer | The input geography boundary layer used to define the geographies to extract. | Feature Layer |
InputBoundaryLayerIdFieldName | The unique identifier for the boundary layer. | Field |
All_Or_Single_Or_Selected | Creates trade areas for features in the boundary layer.
| String |
InputSubgeographyLayer | The layer containing the features to be extracted as trade areas. In most cases, this will be a Business Analyst data layer, such as ZIP Codes. | Feature Layer |
InputSubgeographyLayerIdFieldName | The unique ID field for the subgeography layer. | Field |
InputSubgeographyLayerNameFieldName | The name field for the subgeography layer. | Field |
OutputFeatureClass | The feature class that will contain the trade area features. | Feature Class |
InputSubgeographyCalcRatiosOption | Generates a percentage based on how much each subgeography intersects the Boundary layer and appends these values to the subgeography layer.
| String |
InputSubgeographySpatialRshipOption | Determines how the subgeography will be selected from the boundary layer.
| String |
ByID_Or_ByName (可选) | Field used to select a single feature.
| String |
Single_Site (可选) | ID or name of the feature used to select a single feature. | String |
代码示例
CreateTAFromSubgeography example (stand-alone script)
# Name: CreateTAFromSubgeography.py
# Description: The following stand-alone script demonstrates how to use the CreateTAFromSubgeography tool.
# Author: Esri
# Import system modules
import arcview
import arcpy
arcpy.ImportToolbox(r"C:\Program Files (x86)\ArcGIS\Desktop10.6\Business Analyst\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")
# Acquire extension license
arcpy.CheckOutExtension("Business")
# Define input and output parameters for the Create Trade Area From Subgeography Layer tool.
# Please note that your paths may be different.
InputBoundaryLayer = "C:/temp/TradeArea.shp"
InputSubgeographyLayer = "C:/ArcGIS/Business Analyst/US_2017/Data/Demographic Data/esri_bg.bds"
OutputFeatureClass = "C:/temp/Output_Geography.shp"
InputBoundaryLayerIdFieldName = ""
InputSubgeographyLayerIdFieldName = ""
InputSubgeographyLayerNameFieldName = ""
# Create Subgeography based trade areas
arcpy.CreateTAFromSubgeography_ba(InputBoundaryLayer,
InputSubgeographyLayer,
OutputFeatureClass,
InputBoundaryLayerIdFieldName,
InputSubgeographyLayerIdFieldName,
InputSubgeographyLayerNameFieldName)
# Release extension license
arcpy.CheckInExtension("Business")
环境
此工具不使用任何地理处理环境。
许可信息
- ArcGIS Desktop Basic: 需要 Business Analyst
- ArcGIS Desktop Standard: 需要 Business Analyst
- ArcGIS Desktop Advanced: 需要 Business Analyst