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 Geography Levels

获得 Business Analyst 许可后可用。

  • 描述
  • 使用方法
  • 语法
  • 代码示例
  • 环境
  • 许可信息

描述

Generates trade areas based on standard geographic units.

Learn more about how Create Trade Area From Geography Levels works

使用方法

  • The spatial reference of the output feature class will be the same as the input geography boundary layer.

  • Use the Append Table Attributes to Output Feature Class option to include the demographic data of an ESRI dataset in the output trade areas.

  • The Table Containing Matching Geography IDs must be in a format compatible with ArcMap. Your tabular data can be in the form of a database file format (.dbf) file, a comma- or tab-delimited text (.txt) file, or a relational database management system (RDBMS).

  • All nonmatching ZIP Codes will be excluded in the output trade area.

  • Nonmatching ZIP Codes are ZIP Code records in the Table Containing Matching Geography IDs that are not valid and do not have a corresponding feature in the input geography boundary layer.

  • If you want to select from a list of available geographic features to create a study area, you can use the Trade Area wizard in ArcMap. Selecting geographic features is not available as a geoprocessing tool.

  • In ArcMap, trade areas will only be created for features that are within the active study area or analysis extent.

语法

arcpy.ba.CreateTAFromGeographyLevels(InputGeographyLevelLayer, InputGeographyLevelIdField, InputGeographyUnitsTable, InputGeographyUnitsIdField, InputHandleDuplicateBehavior, OutputFeatureClass, {InputAppendVisibleFields}, {InputGeographyUnitsStoreIdField}, {Dissolve})
参数说明数据类型
InputGeographyLevelLayer

The input feature class used to extract the trade area.

Feature Layer
InputGeographyLevelIdField

The unique identifier for the input geography layer.

Field
InputGeographyUnitsTable

The input table used to select the standard geography units that will define the trade area.

Table View
InputGeographyUnitsIdField

The associated geography ID field used to select the geographic units from the input geography boundary layer.

Field
InputHandleDuplicateBehavior

Allows you to filter duplicate fields in the table containing matching geographic IDs.

  • "SUMMARIZE_FIELD" —If a duplicate record exists, this option will summarize the duplicate fields if the Append Fields From Geography Boundary To Output Feature Class option is selected.
  • "USE_FIRST_FEATURE" —If a duplicate record exists, this option will choose the first record in the table. Any tabular data associated with that record can be appended to the output feature class. This option only appends the data of the first record and ignores any others.
String
OutputFeatureClass

The feature class that will contain the trade area features.

Feature Class
InputAppendVisibleFields
(可选)

Appends the fields from the geography boundary to the output feature class.

  • TRUE —Appends fields to the output feature class.
  • FALSE —Does not append fields to the output feature class. This is the default.
Boolean
InputGeographyUnitsStoreIdField
(可选)

This field assigns the same standard geography units to several stores.

Field
Dissolve
(可选)

This option dissolves the output based on the selected Store ID.

  • TRUE —Dissolves boundaries based on selected Store ID.
  • FALSE —Does not dissolves boundaries. This is the default.
Boolean

代码示例

CreateTAFromGeographyLevels example (stand-alone script)

# Name: CreateTAFromGeographyLevels.py
# Description: The following stand-alone script demonstrates how to use the CreateTAFromGeographyLevels 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 Geography Levels tool.
# Please note that your paths may be different. 
InputGeographyLevelLayer="C:/ArcGIS/Business Analyst/US_2022/Data/Demographic Data/USA_ESRI_2018.gdb/ZIPCodes_zp" 
InputGeographyLevelIdField="ID"
InputGeographyUnitsTable="C:/ArcGIS/Business Analyst/US_2022/Datasets/Tutorial/sf_custs.dbf"
InputGeographyUnitsIdField="ZIP"
InputHandleDuplicateBehavior="USE_FIRST_FEATURE"
OutputFeatureClass= "C:/temp/CreateTA.shp", 
InputAppendVisibleFields="true"
InputGeographyUnitsStoreIdField="STORE_ID", 
Dissolve="TRUE"

# Create standard geography based trade areas
arcpy.CreateTAFromGeographyLevels_ba(InputGeographyLevelLayer,
						InputGeographyLevelIdField,
						InputGeographyUnitsTable,
						InputGeographyUnitsIdField,
						OutputFeatureClass,
						InputAppendVisibleFields,
						InputGeographyUnitsStoreIdField,
						Dissolve)
    
# 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. | 隐私政策 | 法律声明