Доступно с лицензией Business Analyst.
Сводка
Creates a series of lines from each customer to an associated store location. These lines are often called spider diagrams.
Примечание:
This tool is similar to the Generate Origin-Destination Links tool, found in the Analysis toolbox Proximity toolset.
Иллюстрация
Использование
The store layer and customer layer must be a point feature class.
Creating desire lines with drive time and drive distance will take longer than using the straight-line (Euclidean) distance method.
The output shows the spatial distribution between the Store Layer and the Customer Layer and calculates the distance values between each store and customer.
Синтаксис
arcpy.ba.DesireLines(in_stores_layer, in_customers_layer, out_feature_class, store_id_field, link_field, {distance_type}, {units}, {cutoff}, {travel_direction}, {time_of_day}, {time_zone})
Parameter | Объяснение | Тип данных |
in_stores_layer | Input point layer representing store or facility locations. | Feature Layer |
in_customers_layer | Input point layer representing customers or patrons. | Feature Layer |
out_feature_class | The resultant feature class that will be added to the Contents pane. | Feature Class |
store_id_field | Unique ID representing a store or facility location. | Field |
link_field | An ID used to assign individual customers to stores. | Field |
distance_type (Дополнительный) | Defines how distance is calculated based on the method of travel. Straight Line is the default value. When using Portal for ArcGIS or local data sources, travel mode options are dynamically populated. | String |
units (Дополнительный) | Defines the type of distance- or time-measuring units to be used when calculating minimal distance. | String |
cutoff (Дополнительный) | The distance beyond which customers will be considered outliers and therefore excluded from consideration during desire line creation. | Double |
travel_direction (Дополнительный) | Specifies whether to measure travel times or distances from stores to demand points or from demand points to stores.
| String |
time_of_day (Дополнительный) | The time at which travel begins. | Date |
time_zone (Дополнительный) | Specifies the time zone of the Time of Day parameter.
| String |
Пример кода
The following Python window script demonstrates how to use the DesireLines tool.
import arcpy
arcpy.env.baDataSource = "ONLINE;US;"
arcpy.ba.DesireLines("Hubs", "grocery stores", r"C:\Temp\Output.gdb\Hubs_DesireLines", "Loc_name", "Loc_name", "STRAIGHT_LINE_DISTANCE", "MILES", 15, "TOWARD_STORES", None, "TIME_ZONE_AT_LOCATION")
Environments
Информация о лицензиях
- Basic: Требуется Business Analyst
- Standard: Требуется Business Analyst
- Advanced: Требуется Business Analyst