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

  • The Maximum Territory Radius parameter value 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

  • The Territory Buffer Distance parameter value 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 the Minimum Distance Between Centers parameter, 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 the Network Parameters category of parameters is 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 will be calculated based on the method of travel.

Additional distance types (travel modes—for example, Driving Time, Driving Distance) will be dependent on the available network dataset.

  • Straight lineStraight-line, or Euclidean distance, will be used as the distance measure. This is the default.
String
Measure 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
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. The parameter requires a locally installed dataset.

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

The time and date that will be used 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.
  • 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

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 will be calculated based on the method of travel.

  • STRAIGHT_LINEStraight-line, or Euclidean distance, will be 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. The parameter requires a locally installed dataset.

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)

The time and date that will be used 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