Mean Store Center (Business Analyst)

Уровень лицензии:BasicStandardAdvanced

Краткая информация

Creates a centroid (new store location) in the mean geographic center of your customer points.

Learn more about how Mean Store Center works

Рисунок

Mean Store Center example

Использование

Синтаксис

MeanStoreCenter_ba (CustomerLayer, LinkField, CustomerWeightField, OutputFeatureClass, {UseSelectedFeatures}, {InNeedReportOutput}, {InputFeatureLayer}, {IDField}, {DistanceCalculateMethod}, {MeasureUnits}, {InReportTitle}, {ReportFile}, {InMakeClusters}, {InClustersCount}, {ReportFormats})
ПараметрОбъяснениеТип данных
CustomerLayer

The input feature layer. This point layer is usually a customer layer.

Feature Layer
LinkField

The store ID field in the customer layer that assigns each customer to a store location.

Field
CustomerWeightField

The numeric field used in the calculation to determine the mean store center.

Field
OutputFeatureClass

The new feature class that will contain the mean center for customer locations.

Feature Class
UseSelectedFeatures
(дополнительно)

The features used to generate the mean centers.

  • TrueGenerates the mean store center using only the selected features.
  • FalseGenerates the mean store center using all features. This is the default.
Boolean
InNeedReportOutput
(дополнительно)

The option to output a mean store center report.

  • CREATE_REPORTA mean store center report will be generated.
  • DONT_CREATE_REPORTA mean store center report will not be generated. This is the default.
Boolean
InputFeatureLayer
(дополнительно)

The input feature layer containing the center points (typically store points) that will be used in calculating the distance from the mean store center.

Feature Layer
IDField
(дополнительно)

Field used to uniquely identify each store.

Field
DistanceCalculateMethod
(дополнительно)

The method used to calculate the distance between existing stores and the mean store center.

  • DRIVE_TIMEDriving time measured in units of time.
  • DRIVE_DISTANCEDriving distance measured in units of distance.
  • STRAIGHT_LINE_DISTANCEStraight-line distance. This is the default.
String
MeasureUnits
(дополнительно)

The units used with the distance values. By default, the units defined in the Business Analyst preferences will be selected.

  • Decimal Degrees
  • Feet
  • Kilometers
  • Meters
  • Miles
  • Nautical Miles
  • Yards
String
InReportTitle
(дополнительно)

Title for the Mean Store Center report.

String
ReportFile
(дополнительно)

The directory that the Mean Store Center report will be saved to.

Folder
InMakeClusters
(дополнительно)

Will use a K-means algorithm to generate mean store centers based on customer file.

  • TRUEGenerates multiple mean store centers based on customer point clusters.
  • FALSEWill generate a single mean store center on customers. This is the default.
Boolean
InClustersCount
(дополнительно)

Determines the number of clusters generated based on customer file. The default is 10.

Long
ReportFormats
[ReportFormats,...]
(дополнительно)

Select the desired report output format

  • Simple XML
  • PDF
  • HTML
  • CSV
  • ZIP
  • XLSV
  • Stripped XLSX
String

Пример кода

MeanStoreCenter Example (Stand-alone Script)
# Name: MeanStoreCenter.py
# Description: Spatially locates a new store location in the San Francisco market based on customer sales.
# Author: Esri

# Import system modules
import arcview
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") 
 
# Define input and output parameters for the Mean Store Center tool
  CustPath = "C:/temp/sf_cust.shp"
  OutPath = "C:/temp/Mean_Store.shp"
  StoreId = "STORE_ID"
 
# Create Mean Store Center output file
  arcpy.MeanStoreCenter_ba(CustPath, StoreId, "SALES", 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