ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • 帮助
  • Sign Out
ArcGIS Desktop

ArcGIS Online

专为贵组织打造的制图平台

ArcGIS Desktop

全面的专业性 GIS

ArcGIS Enterprise

面向企业的 GIS

ArcGIS Developers

用于构建位置感知应用程序的工具

ArcGIS Solutions

适用于行业的免费模板地图和应用程序

ArcGIS Marketplace

获取适用于组织的应用程序和数据

  • 文档
  • 支持
Esri
  • 登录
user
  • 我的个人资料
  • 登出

ArcMap

  • 主页
  • 入门
  • 地图
  • 分析
  • 管理数据
  • 工具
  • 扩展模块

Setup Level Distance Constraints

获得 Business Analyst 许可后可用。

  • 描述
  • 使用方法
  • 语法
  • 代码示例
  • 环境
  • 许可信息

描述

Allows the setup of distance constraints at the specified level.

使用方法

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

语法

arcpy.td.SetupLevelDistanceConstraints_TD(in_territory_solution_layer, in_level, {in_distance_units}, {in_maximum_distance}, {in_minimum_distance}, {in_centers_minimum_distance})
参数说明数据类型
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
(可选)

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
(可选)

The Maximum distance from a territory's center.

Double
in_minimum_distance
(可选)

The Minimum distance from the center of a nearby territory.

Double
in_centers_minimum_distance
(可选)

The Minimum distance between territory centers.

Double

代码示例

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)

环境

此工具不使用任何地理处理环境。

许可信息

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

相关主题

  • 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

ArcGIS Desktop

  • 主页
  • 文档
  • 支持

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

关于 Esri

  • 关于我们
  • 招贤纳士
  • Esri 博客
  • 用户大会
  • 开发者峰会
Esri
分享您的想法。
Copyright © 2021 Esri. | 隐私政策 | 法律声明