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

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

Setup Customers Using Tabular Data

获得 Business Analyst 许可后可用。

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

描述

Geocodes tabular data and defines the output feature class as a customer file for use in the Analysis And Trade Areas tools.

Learn more about Setup Customers Using Tabular Data

使用方法

  • When geocoding stores, it is best to have address, city, state, and ZIP Code fields to ensure the best results for the geocoder.

  • View the geocoding output log to examine the match rate of your input addresses.

  • The standard input tabular data formats used are .dbf (IV), .csv, and tab-delimited text (.txt).

  • Relational database files can also be accessed through this tool utilizing the Database Connections wizard in ArcCatalog.

  • If importing from Excel to .dbf, make sure your field headers are eight characters or less and do not have special characters embedded in the description.

语法

arcpy.ba.SetupCustomersByTable(Table, Locator, MatchFields, NameField, LinkField, OutputFeatureClass, {CS_AppendsegmentationCodes}, {CS_CreateCustomerProfile}, CS_CustomerProfileName, {InputVolumeInfoFieldName}, SegmentationBase)
参数说明数据类型
Table

The input table used for setting up your customer layer.

Table View
Locator

The predefined address locator service.

Address Locator
MatchFields

Input fields for geocoding addresses.

Field Info
NameField

The unique identifier for the input feature class (commonly the customer name).

Field
LinkField

Unique ID linking the customer file with the store file.

Field
OutputFeatureClass

The feature class that will contain the customer points.

Feature Class
CS_AppendsegmentationCodes
(可选)

Appends Tapestry Segmentation codes to the customer layer.

  • True —Appends the Tapestry Segmentation code to the customer file.
  • False —Will not append Tapestry Segmentation codes to the customer file. This is the default.
Boolean
CS_CreateCustomerProfile
(可选)

Creates a Tapestry Segmentation Profile based on the customer layer.

  • True —Creates a apestry Segmentation Profile based on the customer layer.
  • False —Will not create a apestry Segmentation Profile based on the customer layer. This is the default.
Boolean
CS_CustomerProfileName

The name of the customer profile.

String
InputVolumeInfoFieldName
(可选)

The field containing your volumetric field. Typically this is a sales filed associated with customer data.

Field
SegmentationBase

The base data to be used in creating the customer profile.

  • Total Households —This option will use the Total Households segmentation base to create the customer profile. This is the default.
  • Total Adult Population —This option will use the Adult Population (18+) segmentation base to create the customer profile.
String

代码示例

SetupCustomersByTable example (stand-alone script)

# Name: SetupCustomersByTable.py
# Description: Geocodes San Francisco customers using tabular data. 
# 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")
 
try:
# Acquire extension license 
  arcpy.CheckOutExtension("Business") 
 
# Defines the parameters for the Setup Customers Using Tabular Data tool
  Input = 'C:/ArcGIS/Business Analyst/US_2022/Datasets/Tutorial/sf_custs.dbf'
  OutFC= "C:/temp/sf_customers.shp"
  Locator = "C:/ArcGIS/Business Analyst/US_2022/Data/Geocoding Data/USA_StreetAddress.loc"
  CustName = "NAME"
  StoreId = "STORE_ID"
  FldCol = "Addr ADDRESS VISIBLE;City City VISIBLE;State State VISIBLE;ZIP ZIP VISIBLE"
 
# Generate customer layers with tabular data
  arcpy.SetupCustomersByTable_ba(Input,
	  OutFC,
	  Locator,
	  CustName,
	  StoreId,
	  FldCol)
 
# Release extension license 
arcpy.CheckInExtension("Business")

环境

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

许可信息

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

相关主题

  • An overview of the Customer Setup toolset

ArcGIS Desktop

  • 主页
  • 文档
  • 支持

ArcGIS

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

关于 Esri

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