
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:
Value | Description |
---|---|
DistanceCalcType.esriDistanceCalcTypeStraightLine |
Euclidean or straight-line distance |
DistanceCalcType.esriDistanceCalcTypeDriveTime |
Drive time |
DistanceCalcType.esriDistanceCalcTypeDriveDistance |
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.
C# | ![]() |
---|---|
DesireLinesParameters parameters = new DesireLinesParameters(); // The PointLayer type could take either data as // ESRI.ArcGIS.Client.Tasks.FeatureSet, ESRI.ArcGIS.Client.BAServer.FolderItem, // or a list of ESRI.ArcGIS.Client.BACore.PointRecord items, e.g. //List<PointRecord> points = new List<PointRecord>() { // new PointRecord("Store 1", "Steiner St. & Geary Blvd", "1", 37.78415, -122.4346)}; // Set Stores as a list of PointRecord using implicit cast operator. parameters.Stores = points; // The StoreIDField parameter is ignored if stores are specified as a list of PointRecord. //parameters.StoreIDField = "STORE_ID"; // Set Customers with a valid data type. parameters.Customers = customers; // Set the field name to link customers with a store. parameters.CustomerLinkField = "STORE_ID"; // Optionally restrict analysis to ExtendData object specified with myExtent. //parameters.AnalysisExtent = myExtent; // Set an optional parameter to only use a single store with Store ID "1". parameters.SingleStoreID = "1"; // DistanceCalcType.esriDistanceCalcTypeDriveTime is the default value for DistanceCalcType parameter. //parameters.CalculationMethod = DistanceCalcType.esriDistanceCalcTypeDriveTime; parameters.CutOffDistance = 10; // Miles is the default value for CutOffUnits with CutOffDistance having the actual value in those units. //parameters.CutOffUnits = esriUnits.esriMiles; desireLinesTask.ExecuteAsync(parameters, new AsyncResponder(resultHandler, faultHandler)); |
System.Object
ESRI.ArcGIS.Client.BACore.Client.BATaskParameters
ESRI.ArcGIS.Client.BACore.Client.AnalysisParameters
ESRI.ArcGIS.Client.BAServer.Tasks.AnalysisParameters
ESRI.ArcGIS.Client.BAServer.Tasks.Analyses.DesireLinesParameters
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family