Packagecom.esri.baserver.tasks.analyses
Classpublic class DesireLinesParameters
InheritanceDesireLinesParameters Inheritance AnalysisParameters Inheritance AnalysisParameters Inheritance BATaskParameters Inheritance Object

The DesireLinesParameters class provides input parameters for the Desire Lines task.

The analysis can be restricted to an analysis extent if the AnalysisExtent parameter is specified. The optional singleStoreID parameter restricts the analysis to a single store.

There are three ways to generate desire lines specified with the calculationMethod parameter:

ValueDescription
DistanceCalcType.STRAIGHT_LINE Euclidean or straight-line distance
DistanceCalcType.DRIVE_TIME Drive time
DistanceCalcType.DRIVE_DISTANCE Drive distance

The distance from a customer to the associated store is written to the output feature class in the "DISTANCE" field for every desire line. This distance is calculated in units specified by the distanceUnits parameter. If drive-time desire lines are calculated, the distance is calculated in minutes.

If the cutOffDistance parameter is specified, the customers that lie beyond this straight-line distance from associated stores are excluded from the analysis. The cutOffUnits parameter should specify the cut-off distance units in this case.

Output options for this task include rendering an output image (outputTypes.getMapImage) and/or creating a feature class for subsequent analysis (outputTypes.getFeatureClass). If no output options are specified, the required output options are specified as follows. If the renderingParameters parameter is specified, the image output is requested. If the outputAnalysisItem parameter is specified, the output analysis feature class will be stored in the repository. If both renderingParameters and outputAnalysisItem parameters are missing, the feature class output is requested.

View the examples

See also

DesireLinesTask


Public Properties
 PropertyDefined By
 InheritedactiveDatasetID : String
Active dataset ID.
BATaskParameters
  analysisExtent : Geometry
Spatial/geographic extent to restrict analysis by.
DesireLinesParameters
  calculationMethod : DistanceCalcType
Distance calculation method.
DesireLinesParameters
  customerLinkField : String
The attribute field in the input customers layer which links every customer with an associated store/business ID (required).
DesireLinesParameters
  customers : PointLayer
A point layer containing point features which represent the locations of customers (required).
DesireLinesParameters
  cutOffDistance : Number
Cut off threshold distance in the units specified in the cutOffUnits property.
DesireLinesParameters
  cutOffUnits : String
The distance units of the cutOffDistance property which is used to calculate the cut off distance.
DesireLinesParameters
  distanceUnits : String
The distance units in which the distance to the associated store is calculated and saved in the attributes of the output feature class for every desire line.
DesireLinesParameters
 InheritedoutputAnalysisItem : FolderItem
Configuration options for storing the output feature class in the repository.
AnalysisParameters
 InheritedoutputSpatialReference : SpatialReference
The spatial reference to return the output feature set in.
AnalysisParameters
 InheritedoutputTypes : OutputTypes
Task output types.
BATaskParameters
 InheritedrenderingParameters : RenderingParameters
Configuration options for rendering output to map image.
AnalysisParameters
 InheritedresultType : BAResultType
[read-only] Type of the result returned by the task associated with these parameters.
BATaskParameters
 InheritedreturnGeometry : Boolean
An option specifying the presence of the shape attribute in the returned record set.
AnalysisParameters
  singleStoreID : String
ID of a single store in the stores layer to calculate desire lines for.
DesireLinesParameters
  storeIDField : String
The attribute field name in the input stores layer which is associated with unique store/business IDs (typically store numbers for retail establishments with multiple locations).
DesireLinesParameters
  stores : PointLayer
A point layer containing point features such as businesses, hospitals, schools, etc.; every customer should be assigned to a feature of this layer (required).
DesireLinesParameters
 InheritedtaskName : String
[read-only] Name of a Community Analyst Task associated with these parameters.
BATaskParameters
Public Methods
 MethodDefined By
  
Creates a new instance of the DesireLinesParameters class.
DesireLinesParameters
Property Detail
analysisExtentproperty
analysisExtent:Geometry

Spatial/geographic extent to restrict analysis by. This parameter expects a value of the Extent or Polygon type.


Implementation
    public function get analysisExtent():Geometry
    public function set analysisExtent(value:Geometry):void

See also

calculationMethodproperty 
calculationMethod:DistanceCalcType

Distance calculation method.

The default value is DistanceCalcType.STRAIGHT_LINE.


Implementation
    public function get calculationMethod():DistanceCalcType
    public function set calculationMethod(value:DistanceCalcType):void
customerLinkFieldproperty 
customerLinkField:String

The attribute field in the input customers layer which links every customer with an associated store/business ID (required).


Implementation
    public function get customerLinkField():String
    public function set customerLinkField(value:String):void
customersproperty 
customers:PointLayer

A point layer containing point features which represent the locations of customers (required).


Implementation
    public function get customers():PointLayer
    public function set customers(value:PointLayer):void
cutOffDistanceproperty 
cutOffDistance:Number

Cut off threshold distance in the units specified in the cutOffUnits property.

The default value is NaN.


Implementation
    public function get cutOffDistance():Number
    public function set cutOffDistance(value:Number):void
cutOffUnitsproperty 
cutOffUnits:String

The distance units of the cutOffDistance property which is used to calculate the cut off distance.

The default value is Units.MILES.


Implementation
    public function get cutOffUnits():String
    public function set cutOffUnits(value:String):void
distanceUnitsproperty 
distanceUnits:String

The distance units in which the distance to the associated store is calculated and saved in the attributes of the output feature class for every desire line. If the calculation method is drive time, this property is ignored and the drive time is calculated in minutes.

The default value is Units.MILES.


Implementation
    public function get distanceUnits():String
    public function set distanceUnits(value:String):void
singleStoreIDproperty 
singleStoreID:String

ID of a single store in the stores layer to calculate desire lines for.


Implementation
    public function get singleStoreID():String
    public function set singleStoreID(value:String):void
storeIDFieldproperty 
storeIDField:String

The attribute field name in the input stores layer which is associated with unique store/business IDs (typically store numbers for retail establishments with multiple locations).

The default value is "STORE_ID".


Implementation
    public function get storeIDField():String
    public function set storeIDField(value:String):void
storesproperty 
stores:PointLayer

A point layer containing point features such as businesses, hospitals, schools, etc.; every customer should be assigned to a feature of this layer (required).


Implementation
    public function get stores():PointLayer
    public function set stores(value:PointLayer):void
Constructor Detail
DesireLinesParameters()Constructor
public function DesireLinesParameters(outputTypes:OutputTypes = null)

Creates a new instance of the DesireLinesParameters class.

Parameters
outputTypes:OutputTypes (default = null) — Task output types.
Examples
ActionScript to create DesireLinesParameters and then use in a Desire Lines task:
                     
     var parameters : DesireLinesParameters = new DesireLinesParameters();
     
     // The PointLayer type could take either data as type
     // com.esri.ags.tasks.FeatureSet, com.esri.baserver.FolderItem,
     // or an array of com.esri.bacore.PointRecord items, e.g.
     //var points:Array = [new PointRecord("store_1", "Store 1", "1", 34.052074, -117.207841)];
     
     // Set stores as an array of PointRecord items.
     parameters.stores = new PointLayer(points);
     
     // The storeIDField parameter is ignored if stores are specified as an array of PointRecord.
     //parameters.storeIDField = "STORE_ID";
     
     // Set customers with a valid data type.
     parameters.customers = new PointLayer(customers);
                  
     // Set the field name to link customers with a store.
     parameters.customerLinkField = "STORE_ID";
     
     // Optionally restrict analysis to myExtent that is a value of the Extent or Polygon type.
     //parameters.analysisExtent = myExtent;
     
     // Set an optional parameter to only use a single store with Store ID "1".
     parameters.singleStoreID = "1";
     
     // DistanceCalcType.DRIVE_TIME is the default value for DistanceCalcType
     //parameters.calculationMethod = DistanceCalcType.DRIVE_TIME;
     parameters.cutOffDistance = 10;
     
     // Miles is the default value for cutOffUnits with cutOffDistance having the actual value in those units.
     //parameters.cutOffUnits = Units.MILES;
     
     desireLinesTask.execute(parameters, new Responder(resultHandler, faultHandler));