Set Territory Distance Parameters (Territory Design)

获得 Business Analyst 许可后可用。

摘要

Defines the type of distance calculation or distance constraints to use when creating territories.

使用情况

  • Maximum Territory Radius specifies the maximum size of the territory. Adjacent territories can be smaller than the radius specified if the boundaries between territories overlap. Territories will expand until the radius value is reached.

    Maximum Territory Radius parameter example

  • Territory Buffer Distance specifies the buffer size around each territory that cannot be encroached. Territories will be constrained by the adjacent territory buffer.

    Territory Buffer Distance parameter example

  • When setting Minimum Distance Between Centers, the distance between centers can be greater than the minimum distance.

    Minimum Distance Between Centers parameter example

  • If a network distance is specified, a Territory Network Index (TNI) will be created during the Solve tool execution.

  • If Network Parameters are set, a summary of network settings will be written as messages at the bottom of the Geoprocessing pane during the execution of the Solve tool.

  • The Network Data Source parameter must be set to a local network dataset. Online network solvers are not supported.

参数

标注说明数据类型
Input Territory Solution

The Territory Design solution layer that will be used in the analysis.

Group Layer; Feature Dataset; String
Level

The level to which the distance parameters will be applied.

String
Distance Type
(可选)

Specifies how distance is calculated based on the method of travel.

  • Straight lineStraight-line, or Euclidean distance, is used as the distance measure. This is the default.
String
Measure Units
(可选)

Specifies the type of measuring units that will be used.

  • MetersThe distance unit will be meters.
  • MilesThe distance unit will be miles.
  • Nautical MilesThe distance unit will be nautical miles.
  • KilometersThe distance unit will be kilometers.
  • YardsThe distance unit will be yards.
  • FeetThe distance unit will be feet.
  • InchesThe distance unit will be inches.
  • DecimetersThe distance unit will be decimeters.
  • CentimetersThe distance unit will be centimeters.
  • MillimetersThe distance unit will be millimeters.
  • Decimal DegreesThe distance unit will be decimal degrees.
  • MinutesThe time unit will be minutes.
  • HoursThe time unit will be hours.
  • DaysThe time unit will be days.
  • SecondsThe time unit will be seconds.
String
Maximum Territory Radius
(可选)

The maximum radius of the territory.

Double
Territory Buffer Distance
(可选)

The radius of the territory buffer.

Double
Minimum Distance Between Centers
(可选)

The minimum distance between territory centers.

Double
Network Data Source
(可选)

The network dataset on which the network distance calculation will be performed.

Network Dataset Layer
Build Network Index
(可选)

Specifies whether a network index will be built. A network index will improve performance when solving the territory solution.

  • Checked—A network index will be built. This is the default.
  • Unchecked—A network index will not be built.
Boolean
Travel Direction
(可选)

Specifies the direction of travel between stores and customers.

  • Toward StoresDirection of travel will be from customers to stores. This is the default.
  • Away from StoresDirection of travel will be from stores to customers.
String
Time of Day
(可选)

Specifies the time and date when calculating distance.

Date
Time Zone
(可选)

Specifies the time zone of the Time of Day parameter.

  • Time Zone at LocationThe time zone in which the territories are located will be used. This is the default.
  • UTCCoordinated universal time (UTC) will be used.
  • Time Zone at LocationThe time zone in which the territories are located will be used. This is the default.
  • UTCCoordinated universal time (UTC) will be used.
String
Search Tolerance
(可选)

The search tolerance to be used for locating territories on the network. Territories that are outside the search tolerance will be left unlocated.

This parameter requires a distance value and units for the tolerance. The default value is 5000 meters.

Linear Unit

派生输出

标注说明数据类型
Updated Territory Solution

The updated territory solution.

Group Layer

arcpy.td.SetTerritoryDistanceParameters(in_territory_solution, level, {distance_type}, {units}, {max_radius}, {buffer_distance}, {min_distance}, {network_datasource}, {build_index}, {travel_direction}, {time_of_day}, {time_zone}, {search_tolerance})
名称说明数据类型
in_territory_solution

The Territory Design solution layer that will be used in the analysis.

Group Layer; Feature Dataset; String
level

The level to which the distance parameters will be applied.

String
distance_type
(可选)

Specifies how distance is calculated based on the method of travel.

  • STRAIGHT_LINEStraight-line, or Euclidean distance, is used as the distance measure. This is the default.
  • Additional distance types (travel modes—for example, Driving Time, Driving Distance) will be dependent on the available network dataset.
String
units
(可选)

Specifies the type of measuring units that will be used.

  • METERSThe distance unit will be meters.
  • MILESThe distance unit will be miles.
  • NAUTICAL_MILESThe distance unit will be nautical miles.
  • KILOMETERSThe distance unit will be kilometers.
  • YARDSThe distance unit will be yards.
  • FEETThe distance unit will be feet.
  • INCHESThe distance unit will be inches.
  • DECIMETERSThe distance unit will be decimeters.
  • CENTIMETERSThe distance unit will be centimeters.
  • MILLIMETERSThe distance unit will be millimeters.
  • DECIMAL_DEGREESThe distance unit will be decimal degrees.
  • MINUTESThe time unit will be minutes.
  • HOURSThe time unit will be hours.
  • DAYSThe time unit will be days.
  • SECONDSThe time unit will be seconds.
String
max_radius
(可选)

The maximum radius of the territory.

Double
buffer_distance
(可选)

The radius of the territory buffer.

Double
min_distance
(可选)

The minimum distance between territory centers.

Double
network_datasource
(可选)

The network dataset on which the network distance calculation will be performed.

Network Dataset Layer
build_index
(可选)

Specifies whether a network index will be built. A network index will improve performance when solving the territory solution.

  • BUILD_INDEXA network index will be built. This is the default.
  • DO_NOT_BUILD_INDEXA network index will not be built.
Boolean
travel_direction
(可选)

Specifies the direction of travel between stores and customers.

  • TOWARD_STORESDirection of travel will be from customers to stores. This is the default.
  • AWAY_FROM_STORESDirection of travel will be from stores to customers.
String
time_of_day
(可选)

Specifies the time and date when calculating distance.

Date
time_zone
(可选)

Specifies the time zone of the Time of Day parameter.

  • TIME_ZONE_AT_LOCATIONThe time zone in which the territories are located will be used. This is the default.
  • UTCCoordinated universal time (UTC) will be used.
String
search_tolerance
(可选)

The search tolerance to be used for locating territories on the network. Territories that are outside the search tolerance will be left unlocated.

This parameter requires a distance value and units for the tolerance. The default value is 5000 meters.

Linear Unit

派生输出

名称说明数据类型
out_territory_solution

The updated territory solution.

Group Layer

代码示例

SetTerritoryDistanceParameters example (Python window)

The following Python window script demonstrates how to use the SetTerritoryDistanceParameters function.

import arcpy
arcpy.td.SetTerritoryDistanceParameters("TerritorySolution", "Territories[1]", "STRAIGHT_LINE", "MILES", 5, 1, 3, "\Data\Streets Data\NorthAmerica.gdb\Routing\Routing_ND", "BUILD_INDEX", None, "5:30:00 PM", "TIME_ZONE_AT_LOCATION", "5000 Meters")

环境

特殊情况

许可信息

  • Basic: 需要 Business Analyst
  • Standard: 需要 Business Analyst
  • Advanced: 需要 Business Analyst

相关主题