Desire Lines (Business Analyst)

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

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

Creates a series of lines from each customer to an associated store location. These lines are often called spider diagrams.

Learn more about how Desire Lines works

Рисунок

Desire Lines wide

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

Синтаксис

DesireLines_ba (InputFeatureLayer, IDField, All_Or_Single_Or_Selected, CustomerLayer, LinkField, DistanceCalculateMethod, MeasureUnitsForDistanceField, OutputFeatureClass, {ByID_Or_ByName}, {Single_Site}, {UseSelectedFeatures}, {ExcludeOutlyingCustomers}, {CutOffDistance}, {MeasureUnits}, {AddDistanceToBusiness}, {WayToDefineDistanceField}, {DesireLinesDistanceField}, {NameField}, {BarrierFeatureClasses})
ПараметрОбъяснениеТип данных
InputFeatureLayer

The input feature layer containing the center points for the desire lines. Desire lines are drawn from these features.

Feature Layer
IDField

Field used to uniquely identify each store.

Field
All_Or_Single_Or_Selected

Runs a desire line analysis on one or more stores.

  • ALLRuns analysis on all stores. This is the default.
  • SINGLERuns analysis on a single store.
String
CustomerLayer

Contains the customer points for the desire lines. Desire lines are drawn from the store to these features.

Feature Layer
LinkField

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

Field
DistanceCalculateMethod

The method used to derive length of each desire line.

  • 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
MeasureUnitsForDistanceField

The units used with the distance values.

  • Decimal Degrees
  • Feet
  • Kilometers
  • Meters
  • MilesThis is the default.
  • Nautical Miles
  • Yards
String
OutputFeatureClass

The feature class that will contain the desire lines.

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

Field used to select a single point.

  • IDSelects a single point using the store ID field.
  • NameSelects a single point using the store name field.
String
Single_Site
(дополнительно)

ID or name of store that is to be used as the single point.

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

Uses only selected features to generate the desire lines.

  • TrueGenerates desire lines on selected features.
  • FalseGenerates desire lines on all features.
Boolean
ExcludeOutlyingCustomers
(дополнительно)

Allows you to set a cutoff distance to remove outlying points from the analysis.

  • TrueExcludes outlying customers.
  • FalseIncludes outlying customers.
Boolean
CutOffDistance
(дополнительно)

The threshold to exclude outlying customers from the analysis.

Double
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
  • MilesThis is the default.
  • Nautical Miles
  • Yards
String
AddDistanceToBusiness
(дополнительно)

Adds a new field that will contain the distance calculated to each store for each customer record.

  • TrueAdds a distance field to the customer layer.
  • FalseDoes not add a distance field to the customer layer. This is the default.
Boolean
WayToDefineDistanceField
(дополнительно)

Uses an existing distance field in the customer layer to store the length of each desire line.

  • CREATE_NEWCreates a new attribute field for distance. This is the default.
  • USE_EXISTINGUses an existing attribute field for distance.
Boolean
DesireLinesDistanceField
(дополнительно)

The field that will contain the distance calculated in the analysis.

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

This field contains the store name which is typically in a string format.

Field
BarrierFeatureClasses
[BarrierFeatureClasses,...]
(дополнительно)

Allows a user to place point, line, or polygon barriers when using drive time or drive distance algorithms to calculate distances.

Feature Layer

Пример кода

DesireLines Example (Stand-alone Script)
# Name: DesireLines.py
# Description: Creates a spider diagram between stores and customers in San Francisco using a straight line distance calculation.
# Author: Esri
import arcgisscripting

# 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 the parameters for the Desire Lines tool
  StorePath = "C:/temp/sf_stores.shp"
  CustPath = "C:/temp/sf_cust.shp"
  OutPath = "C:/temp/desire_lines.shp"
  StoreId = "STORE_ID"
  AssociatedStoreId = "STORE_ID"
 
# Create Desire Line output file
  arcpy.DesireLines_ba(StorePath, StoreId, "ALL", CustPath, AssociatedStoreId, "STRAIGHT_LINE_DISTANCE", "Miles", 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