Create Trade Area From Geography Levels (Business Analyst)

许可等级:BasicStandardAdvanced

摘要

Generates trade areas based on standard geographic units.

Learn more about how Create Trade Area From Geography Levels works

用法

语法

CreateTAFromGeographyLevels_ba ({Dissolve}, InputGeographyLevelLayer, InputGeographyLevelIdField, InputGeographyUnitsTable, InputGeographyUnitsIdField, {InputGeographyUnitsStoreIdField}, InputHandleDuplicateBehavior, OutputFeatureClass, {InputAppendVisibleFields})
参数说明数据类型
Dissolve
(可选)

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

  • TRUEDissolves boundaries based on selected Store ID.
  • FALSEDoes not dissolves boundaries. This is the default.
Boolean
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
InputGeographyUnitsStoreIdField
(可选)

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

Field
InputHandleDuplicateBehavior

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

  • SUMMARIZE_FIELDIf 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 FEATUREIf 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.

  • TRUEAppends fields to the output feature class.
  • FALSEDoes not append fields to the output feature class. This is the default.
Boolean

代码实例

CreateTAFromGeographyLevels Example (Stand-alone Script)
# Name: CreateTAFromGeographyLevels.py
# Description: Automatically selects a set of ZIP Codes in San Francisco County from a list.
# Author: Esri

# Import system modules
import arcview
import arcpy
 
try:
# Acquire extension license 
  arcpy.CheckOutExtension("Business") 

  arcpy.AddToolbox("C:\Program Files (x86)\ArcGIS\Desktop10.2\Business Analyst\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")
 
# Define input and output parameters for the Create Trade Area From Geography Levels tool
  InputGeo = "C:/ArcGIS/Business Analyst/US_2013/Data/BDS/esri_zip5.bds"
  InputIds = "C:/temp/sf_custs.dbf"
  GeoId = "ID"
  Id = "ZIP"
  OutPath = "C:/temp/Output_Geography.shp"
 
# Create standard geography based trade areas
  arcpy.CreateTAFromGeographyLevels_ba(InputGeo, GeoId, InputIds, Id, "USE_FIRST_FEATURE", OutPath)
 
# Release extension license 
  arcpy.CheckInExtension("Business") 
 
except:
  print arcpy.GetMessages(2)

环境

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

相关主题

许可信息

ArcGIS for Desktop Basic: 需要 Business Analyst
ArcGIS for Desktop Standard: 需要 Business Analyst
ArcGIS for Desktop Advanced: 需要 Business Analyst
4/27/2014