ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Setup Level Distance Constraints

  • Summary
  • Usage
  • Syntax
  • Code Sample
  • Environments
  • Licensing Information

Summary

Allows the setup of distance constraints at the specified level.

Usage

  • The Territory Level format must be as follows: Level_Name[Level_Index]

  • The Distance Units parameter depends on the value of Measure Type. This value can be modified by UI or the SetupLevelParameter tool (see in_measure_type parameter).

  • Maximum Distance, Minimum Distance and Minimum Distance Between Centers values must be greater than zero.

Syntax

SetupLevelDistanceConstraints_TD_td (in_territory_solution_layer, in_level, {in_distance_units}, {in_maximum_distance}, {in_minimum_distance}, {in_centers_minimum_distance})
ParameterExplanationData Type
in_territory_solution_layer

The Territory Solution layer used to setup the parameters.

GP TD Layer
in_level

The Territory Level to modify.

String
in_distance_units
(Optional)

The Distance Units for the distance constraints.

  • STRAIGHT_LINE_DISTANCE —value of Measure Type:
    • MILES
    • KILOMETERS
    • FEET
    • YARDS
    • NAUTICAL_MILES
    • METERS
    • DECIMAL_DEGREES
  • DRIVE_TIME —value of Measure Type:
    • DAYS
    • HOURS
    • MINUTES
    • SECONDS
String
in_maximum_distance
(Optional)

The Maximum distance from a territory's center.

Double
in_minimum_distance
(Optional)

The Minimum distance from the center of a nearby territory.

Double
in_centers_minimum_distance
(Optional)

The Minimum distance between territory centers.

Double

Code Sample

SetupLevelDistanceConstraints_TD example (Python window)

The following Python window script demonstrates how to use the tool in immediate mode.

import arcgisscripting
gp = arcgisscripting.create()
gp.SetupLevelDistanceConstraints_TD("new layer", "Territories[1]", "MILES", 100, 40, 80)
SetupLevelDistanceConstraints_TD example 2 (stand-alone script)

The following stand-alone script demonstrates how to use the tool.

# Import system modules
import arcgisscripting
gp = arcgisscripting.create()

# Set local variables
solution = "new layer"
level = "Territories[1]"
distanceUnits = "MILES"
maximumDistance = 100
minimumDistance = 40
minimumCentersDistance = 80

# Execute tool
gp.SetupLevelDistanceConstraints_TD(solution, level, maximumDistance, minimumDistance, minimumCentersDistance)

Environments

This tool does not use any geoprocessing environments

Licensing Information

  • ArcGIS for Desktop Basic: Requires Business Analyst
  • ArcGIS for Desktop Standard: Requires Business Analyst
  • ArcGIS for Desktop Advanced: Requires Business Analyst

Related Topics

  • An Overview of the Setup Territory Solution Toolset
  • Create Territories
  • Setup Level Balancing Variables
  • Setup Level Capacity Constraints
  • Setup Solution Barriers
  • Setup Solution Restricted Areas
Feedback on this topic?

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal