Desire Lines (Business Analyst)

Zusammenfassung

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

Abbildung

Desire Lines wide

Verwendung

Syntax

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})
ParameterErläuterungDatentyp
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
(optional)

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
(optional)

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

String
UseSelectedFeatures
(optional)

Uses only selected features to generate the desire lines.

  • TrueGenerates desire lines on selected features.
  • FalseGenerates desire lines on all features.
Boolean
ExcludeOutlyingCustomers
(optional)

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

  • TrueExcludes outlying customers.
  • FalseIncludes outlying customers.
Boolean
CutOffDistance
(optional)

The threshold to exclude outlying customers from the analysis.

Double
MeasureUnits
(optional)

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
(optional)

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
(optional)

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
(optional)

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

String
NameField
(optional)

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

Field
BarrierFeatureClasses
[BarrierFeatureClasses,...]
(optional)

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

Feature Layer

Codebeispiel

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.
import arcgisscripting

# Import system modules

import arcview
import arcpy

arcpy.ImportToolbox("C:\Program Files\ArcGIS\Desktop10.0\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)

Umgebungen

Dieses Werkzeug verwendet keine Geoverarbeitungsumgebungen.

Verwandte Themen

Lizenzinformationen

ArcView: Erfordert Business Analyst
ArcEditor: Erfordert Business Analyst
ArcInfo: Erfordert Business Analyst

10/4/2010