ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Hilfe
  • Sign Out
ArcGIS Desktop

ArcGIS Online

Die Mapping-Plattform für Ihre Organisation

ArcGIS Desktop

Ein vollständiges professionelles GIS

ArcGIS Enterprise

GIS in Ihrem Unternehmen

ArcGIS Developers

Werkzeuge zum Erstellen standortbezogener Apps

ArcGIS Solutions

Kostenlose Karten- und App-Vorlagen für Ihre Branche

ArcGIS Marketplace

Rufen Sie Apps und Daten für Ihre Organisation ab.

  • Dokumentation
  • Support
Esri
  • Anmelden
user
  • Eigenes Profil
  • Abmelden

ArcMap

  • Startseite
  • Erste Schritte
  • Karte
  • Analysieren
  • Verwalten von Daten
  • Werkzeuge
  • Erweiterungen

Setup Level Territory Shape Parameters

Mit der Business Analyst-Lizenz verfügbar.

  • Zusammenfassung
  • Verwendung
  • Syntax
  • Codebeispiel
  • Umgebungen
  • Lizenzinformationen

Zusammenfassung

Allows the setup of parameter levels to create or balance territories.

Verwendung

  • The format for the Territory Level is as follows: Level_Name[Level_Index]

  • The range for the Compactness parameter is from 0 to 100.

Syntax

arcpy.td.SetupLevelTerritoryShapeParameters_TD(in_territory_solution_layer, in_level, {in_measure_type}, {in_network_dataset}, {in_tni_location}, {in_tni_name}, {in_distance_type}, {in_compactness}, {in_use_only_closest}, {in_territory_center_location}, {in_summary_attribute})
ParameterErklärungDatentyp
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_measure_type
(optional)

Measure type for building the territory shape.

  • STRAIGHT_LINE_DISTANCE —distance will be calculated from geography of geometries.
  • NETWORK_ANALYSIS —distances will be calculated from a specified Network Analyst solver and Distance Type.
  • TERRITORY_NETWORK_INDEX —distances will calculated using a pre-built cache of Network Analyst results with specified Distance Type.
String
in_network_dataset
(optional)

The Network Analyst dataset which will be used for distance calculations.

String
in_tni_location
(optional)

The location of the territory network index.

String
in_tni_name
(optional)

The name of the territory index that will be used.

String
in_distance_type
(optional)

The impedance attribute of a Territory Network Index or Network Analyst dataset and is used for distance calculations.

String
in_compactness
(optional)

This parameter adjusts the preference between territory shape and variable balance. A low value of compactness means good balance but shape is compromised.

Integer
in_use_only_closest
(optional)

This option overrides previous balancing. Minimum attribute capacity constraints can be used to ensure a more ideal territory shape. Territories can only acquire features that are closest to their territory center, instead of centers of surrounding territories. This essentially puts less emphasis on statistical inputs and applies a heavier weight to maintaining a territory boundary.

  • USE_ONLY_CLOSEST_FEATURES —Only the closest features will be used for deriving territories.
  • USE_ALL_FEATURES —All surrounding features will be used for deriving territories.
Boolean
in_territory_center_location
(optional)

The location of a non-fixed (not created from seed points) center is defined with this parameter. The territory center will change automatically as the territory shape changes but will always reside inside the territory boundary.

  • GEOMETRIC_CENTER —Territory center will be placed at the geometric center of the territory (center of the territory’s bounding box).
  • MEAN_CENTER —Territory center will be placed at the mean center as defined by spatial locations with or without a specified summary attribute.
  • DENSITY_CENTER —Territory center will be placed at the density center by spatial locations with or without a specified summary attribute.
  • FARTHEST_POINT_FROM_ALL_BOUNDARIES —Territory center will be located at the farthest location from all its territory boundaries.
String
in_summary_attribute
(optional)

The Territories can be calculated using the locations of each geography element or the summary value assigned to each geography element. This parameter is used to specify the base level field to calculate the territory. Set an empty value when using spatial locations only.

Field

Codebeispiel

SetupLevelTerritoryShapeParameters_TD example (Python window)

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

import arcgisscripting
gp = arcgisscripting.create()
gp.SetupLevelTerritoryShapeParameters_TD("new layer", "Territories[1]", "STRAIGHT_LINE_DISTANCE", "", "", "", "", 50, "USE_ALL_FEATURES", "MEAN_CENTER", "TOTPOP_CY")
SetupLevelTerritoryShapeParameters_TD example 2 (stand-alone script)

The following stand-alone script demonstrates how to setup a territory solution to use geography of geometries to calculate distances.

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

# Set local variables
solution = "new layer"
level = "Territories[1]"
measureType = "STRAIGHT_LINE_DISTANCE"
networkDataset = ""
tniLocation = ""
tniName = ""
distanceUnit = ""
compactness = 50
useFeatures = "USE_ALL_FEATURES"
territoryCenterLocation = "MEAN_CENTER"
summaryAttribute = "TOTPOP_CY"

# Execute tool
gp.SetupLevelTerritoryShapeParameters_td(solution, level, measureType, networkDataset, tniLocation, tniName, distanceUnit, compactness, useFeatures, territoryCenterLocation, summaryAttribute)

Demonstrates how to use the Network Analyst solver.

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

# Set local variables
solution = "new layer"
level = "Territories[1]"
measureType = "NETWORK_ANALYSIS"
networkDataset = "C:/Data/Streets.gdb/Routing/Routing_ND"
tniLocation = ""
tniName = ""
distanceUnit = "Miles"
compactness = 50
useFeatures = "USE_ALL_FEATURES"
territoryCenterLocation = "MEAN_CENTER"
summaryAttribute = "TOTPOP_CY"

# Execute tool
gp.SetupLevelTerritoryShapeParameters_td(solution, level, measureType, networkDataset, tniLocation, tniName, distanceUnit, compactness, useFeatures, territoryCenterLocation, summaryAttribute)

Demonstrates how to use the pre-built Network Analyst solver results.

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

# Set local variables
solution = "new layer"
level = "Territories[1]"
measureType = "TERRITORY_NETWORK_INDEX"
networkDataset = ""
tniLocation = "C:/BA Output/Projects/Default Project/Custom Territory Network Indexes/"
tniName = "Routing_ND - Miles.tni"
distanceUnit = "Miles"
compactness = 50
useFeatures = "USE_ALL_FEATURES"
territoryCenterLocation = "MEAN_CENTER"
summaryAttribute = "TOTPOP_CY"

# Execute tool
gp.SetupLevelTerritoryShapeParameters_td(solution, level, measureType, networkDataset, tniLocation, tniName, distanceUnit, compactness, useFeatures, territoryCenterLocation, summaryAttribute)

Umgebungen

Dieses Werkzeug verwendet keine Geoverarbeitungsumgebungen.

Lizenzinformationen

  • Basic: Erfordert Business Analyst
  • Standard: Erfordert Business Analyst
  • Advanced: Erfordert Business Analyst

Verwandte Themen

  • An Overview of the Setup Territory Solution Toolset
  • Create Territories
  • Setup Level Balancing Variables
  • Setup Level Capacity Constraints
  • Setup Level Distance Constraints
  • Setup Solution Barriers
  • Setup Solution Restricted Areas

ArcGIS Desktop

  • Startseite
  • Dokumentation
  • Support

ArcGIS

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

Über Esri

  • Über uns
  • Karriere
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Wir sind an Ihrer Meinung interessiert.
Copyright © 2021 Esri. | Datenschutz | Rechtliches