Setup Store Using Existing Data (Business Analyst)

许可等级:BasicStandardAdvanced

摘要

Imports stores that are in a shapefile format (already geocoded) and identifies them as stores for further analysis.

用法

语法

SetupStoreByExistingData_ba (InputFeatureLayer, NameField, StoreIDField, WayToSpecifyStoreIDField, CreateNewFeatureClass, OutputFeatureClass)
参数说明数据类型
InputFeatureLayer

The existing layer that contains your stores.

Feature Layer
NameField

Selects a field to be used to identify the store name.

Field
StoreIDField

The name used to identify the store ID.

String
WayToSpecifyStoreIDField

Selects an existing store ID field or creates a new field.

  • USE_EXISTINGUses the existing Store ID Field. This is the default.
  • CREATE_NEWCreates a new store ID field.
Boolean
CreateNewFeatureClass

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

  • TrueCreates a new feature class.
  • FalseDoes not create a new feature class. The original layer will be used. This is the default
Boolean
OutputFeatureClass

The feature class that will contain the store points.

Feature Class

代码实例

SetupStoreByExistingData Example (Stand-alone Script)
# Name: SetupStoreByExistingData.py
# Description: Creates a customer layer using an existing point layer. 
# Author: Esri

# Import system modules 
 
import arcpy

arcpy.ImportToolbox("C:\Program Files (x86)\ArcGIS\Desktop10.2\Business Analyst\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")

try:
# Acquire extension license
  arcpy.CheckOutExtension("Business")

# Defines the parameters for the Setup Store Using Existing Data tool
  StorePath = "C:/temp/sf_stores.shp"
  StoreName = "NAME"
  StoreID = "STORE_ID"

# Sets up a new store layer based on an existing layer
  arcpy.SetupStoreByExistingData_ba(StorePath, StoreName, StoreID)

# 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