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

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

Assign Customers by SOLAP Data

获得 Business Analyst 许可后可用。

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

描述

This tool is designed to use multiple SALES fields, which are extracted from the OLAP cube to build criteria for assigning customers to the stores.

使用方法

语法

arcpy.ba.AssignCustomersBySOLAP(CustomerLayer, InStoreDimension, InSelectedHierarchyLevels, WayToDefineLinkField, LinkField, {VBSScriptString}, {InAssignToOneStore}, {CreateNewFeatureClass}, {OutputFeatureClass})
参数说明数据类型
CustomerLayer

The customer layer used to make the customer assignments to each store.

Feature Layer
InStoreDimension

Select the store dimension in the customer layer. A dimension is an axis of an OLAP cube.

String
InSelectedHierarchyLevels

Select the hierarchy level to process. Hierarchies categorize a dimension into a number of levels. More than one hierarchy can be associated with the same dimension.

String
WayToDefineLinkField

Determines how store is selected.

  • CREATE NEW —Creates a new Store ID field.
  • USE EXISTING —Uses an existing Store ID field.
String
LinkField

The store ID field that will be used to assign customers.

String
VBSScriptString
(可选)

Input a custom VBS script assigning customers to stores based on the dimensions in the customer layer.

String
InAssignToOneStore
(可选)

Allows the user to decide if the assignment of a customer to a store will be influenced by which store he/she shops at most.

  • True —Assigns the customer to the store he/she shops at most.
  • False —Will not assign the customer to the store he/she shops at most.
Boolean
CreateNewFeatureClass
(可选)

Generates a new feature class based on the existing layer or uses the existing layer.

  • True —Creates a new feature class.
  • False —Does not create a new feature class. The original layer will be used.
Boolean
OutputFeatureClass
(可选)

The feature class that will contain the customer features.

Feature Class

代码示例

AssignCustomersBySOLAP example (stand-alone script)

# Name: AssignCustomersBySOLAP.py
# Description: Assigns customers in the San Francisco area to their designated store.
# 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") 
 
# Define the parameters for the Assign Customers by SOLAP Data tool

  CustPath = "C:\My Output Data\Projects\Default Project\CustLayers\OLAP\Customer.shp"
  StoreDim = "Product"
  Hierarchy = "ALL"
  StoreId = "STORE_ID"
 
# Assign Customers by SOLAP Data
  arcpy.AssignCustomersBySOLAP_ba(CustPath,
	  StoreDim,
	  Hierarchy,
	  StoreId)
 
# 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. | 隐私政策 | 法律声明