Set Territory Distance Parameters (Territory Design)

Available with Business Analyst license.

Summary

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

Usage

  • 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.

Parameters

LabelExplanationData Type
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
(Optional)

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

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

Specifies the type of measuring units that will be used.

  • Meters —The distance unit will be meters.
  • Miles —The distance unit will be miles.
  • Nautical Miles —The distance unit will be nautical miles.
  • Kilometers —The distance unit will be kilometers.
  • Yards —The distance unit will be yards.
  • Feet —The distance unit will be feet.
  • Inches —The distance unit will be inches.
  • Decimeters —The distance unit will be decimeters.
  • Centimeters —The distance unit will be centimeters.
  • Millimeters —The distance unit will be millimeters.
  • Decimal Degrees —The distance unit will be decimal degrees.
  • Minutes —The time unit will be minutes.
  • Hours —The time unit will be hours.
  • Days —The time unit will be days.
  • Seconds —The time unit will be seconds.
String
Maximum Territory Radius
(Optional)

The maximum radius of the territory.

Double
Territory Buffer Distance
(Optional)

The radius of the territory buffer.

Double
Minimum Distance Between Centers
(Optional)

The minimum distance between territory centers.

Double
Network Data Source
(Optional)

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

Network Dataset Layer
Build Network Index
(Optional)

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

Specifies the direction of travel between stores and customers.

  • Toward Stores —Direction of travel will be from customers to stores. This is the default.
  • Away from Stores —Direction of travel will be from stores to customers.
String
Time of Day
(Optional)

Specifies the time and date when calculating distance.

Date
Time Zone
(Optional)

Specifies the time zone of the Time of Day parameter.

  • Time Zone at Location —The time zone in which the territories are located will be used. This is the default.
  • UTC —Coordinated universal time (UTC) will be used.
  • Time Zone at Location —The time zone in which the territories are located will be used. This is the default.
  • UTC —Coordinated universal time (UTC) will be used.
String
Search Tolerance
(Optional)

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

Derived Output

LabelExplanationData Type
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})
NameExplanationData Type
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
(Optional)

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

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

The maximum radius of the territory.

Double
buffer_distance
(Optional)

The radius of the territory buffer.

Double
min_distance
(Optional)

The minimum distance between territory centers.

Double
network_datasource
(Optional)

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

Network Dataset Layer
build_index
(Optional)

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

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

Specifies the time and date when calculating distance.

Date
time_zone
(Optional)

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

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

Derived Output

NameExplanationData Type
out_territory_solution

The updated territory solution.

Group Layer

Code sample

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")

Environments

Licensing information

  • Basic: Requires Business Analyst
  • Standard: Requires Business Analyst
  • Advanced: Requires Business Analyst

Related topics