ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • 帮助
  • Sign Out
ArcGIS Desktop

ArcGIS Online

专为贵组织打造的制图平台

ArcGIS Desktop

全面的专业性 GIS

ArcGIS Enterprise

面向企业的 GIS

ArcGIS Developers

用于构建位置感知应用程序的工具

ArcGIS Solutions

适用于行业的免费模板地图和应用程序

ArcGIS Marketplace

获取适用于组织的应用程序和数据

  • 文档
  • 支持
Esri
  • 登录
user
  • 我的个人资料
  • 登出

ArcMap

  • 主页
  • 入门
  • 地图
  • 分析
  • 管理数据
  • 工具
  • 扩展模块

Create Trade Area From Sub-geography Layer

获得 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.

语法

arcpy.ba.CreateTAFromSubgeography(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.

  • All —Creates trade areas for all features.
  • Single —Creates trade areas for a single feature.
  • Selected —Creates trade areas for all selected features in ArcMap.
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.

  • 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 areas of the subgeographies that intersect the boundary layer.
  • None —No percentages will be calculated.
String
InputSubgeographySpatialRshipOption

Determines how the subgeography will be selected from the boundary layer.

  • Intersect —If any of the subgeography features touch or intersect the boundary layer, they will be included in output layer.
  • Centroid Within —If the centroids of any of the subgeography features are contained within the boundary layer, they will be included in the output layer.
  • Completely Within —Only the features of the subgeography layer that are completely contained within the boundary layer will be included in the output layer.
String
ByID_Or_ByName
(可选)

Field used to select a single feature.

  • ID —Selects a single feature using the ID field.
  • Name —Selects a single feature using the name field.
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.8\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_2022/Data/Demographic Data/BlockGroups_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")

环境

此工具不使用任何地理处理环境。

许可信息

  • Basic: 需要 Business Analyst
  • Standard: 需要 Business Analyst
  • Advanced: 需要 Business Analyst

相关主题

  • An overview of the Trade Areas toolset

ArcGIS Desktop

  • 主页
  • 文档
  • 支持

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

关于 Esri

  • 关于我们
  • 招贤纳士
  • Esri 博客
  • 用户大会
  • 开发者峰会
Esri
分享您的想法。
Copyright © 2022 Esri. | 隐私政策 | 法律声明