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

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

Calculate Visual Specifications

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

描述

Production configuration tool that applies representation symbology as well as calculates label fields for multiple layers.

This tool uses relational queries to apply symbology to many layers and to calculate field values and in doing so, links feature attributes to representation rules and label expressions. This provides a single production workflow to create and maintain symbology and text.

使用方法

  • You can apply multiple visual specifications to multiple input features.

  • The Visual Specifications Workspace contains the visual specifications you can apply to input features.

  • The calculation of the visual specification adds fields to the input features. The number and names of the fields will vary but will include:

    • A field that holds the representation rule number. This is known as the representation rule field.
    • An override field associated with the representation to store symbol exception information. The override field contains exception information on an individual representation.
    • An optional new or existing field that holds calculated values. The calculated field contains the value that is produced as part of the selected specification.

  • The representation rule field contains the number of the symbol being used for the feature class in association with feature class representations.

  • The tool's output parameter type in ModelBuilder is multiple value. The multiple value is a list of Input Features.

语法

arcpy.production.CalculateVisualSpecifications(in_features, vs_workspace, specifications, render_representations, display_labels, preserve_free_representations)
参数说明数据类型
in_features
[in_features,...]

The feature layers, feature classes, or tables to which you want to apply the visual specifications.

Table View
vs_workspace

The location of the workspace that contains the visual specifications table (VST_Specification). This table can be stored in a personal, file, or enterprise geodatabase.

Workspace
specifications
[specifications,...]

The visual specifications you want to apply to the selected feature layers and feature classes.

String
render_representations

Indicates whether calculated representations in in_features are displayed.

  • RENDER_REPRESENTATIONS —Displays calculated representations. This is the default.
  • NO_RENDER_REPRESENTATIONS —Does not display calculated representations.
Boolean
display_labels

Indicates whether calculated fields are displayed as labels.

  • DISPLAY_LABELS —Displays calculated fields as labels. This is the default.
  • NO_DISPLAY_LABELS —Does not display calculated fields as labels.

Boolean
preserve_free_representations

Indicates whether free representations are preserved.

  • PRESERVE —The tool will not overwrite free representations within any features. This is the default.
  • NO_PRESERVE —The tool will overwrite free representations within any features.

Boolean

代码示例

CalculateVisualSpecifications example (Python window)

The following Python window script demonstrates how to use the CalculateVisualSpecifications tool.

import arcpy

# set gp environment
arcpy.env.workspace="c:/data"
arcpy.env.addOutputsToMap = True

# local variables
woods = "Austin.gdb/LandUse/WoodyA"
woodsLayer = "Woods"
vstWorkspace="ProductLibrary.gdb"
vizSpec = "TopoMap 1:24,000 :: TopoMap 1:24,000 Specification"
render="RENDER_REPRESENTATIONS"
labels="DISPLAY_LABELS"
preserve="NO_PRESERVE"

# make a feature layer from the woodyA feature class
arcpy.MakeFeatureLayer_management(woods, woodsLayer)

# NOTE: The comma delimited visual specification string may not display correctly
# in the dropdown list in the python window. You can copy the complete visual
# specification string from the Visual Specifications tool on the Production Symbology toolbar.
arcpy.CalculateVisualSpecifications_production(woodsLayer,vstWorkspace,vizSpec,render,labels,preserve)
CalculateVisualSpecifications example 2 (stand-alone script)

This stand-alone script demonstrates how to use the CalculateVisualSpecifications tool.

# CalcVisualSpec.py
# Description: Executes Calculate Visual Specifications tool

# Import arcpy module
import arcinfo
import arcpy

# check out a foundation license
arcpy.CheckOutExtension("Foundation")

# vst workspace variable
vs_workspace = r'C:\student\PS_Carto\Database\WilsonPL.gdb'

# make two feature layers for the calc vst process
arcpy.MakeFeatureLayer_management(r'C:\student\PS_Carto\Database\Wilson.gdb\Transportation\Streets', 'streets_vst')
arcpy.MakeFeatureLayer_management(r'C:\student\PS_Carto\Database\Wilson.gdb\Utility\Gaslines', 'gaslines_vst')

# create a list of the two feature layers
features = ['streets_vst','gaslines_vst']

# exec Calculate Visual Specifications
arcpy.CalculateVisualSpecifications_production(features, vs_workspace, "Carto_Streets :: Cartographic represenation of streets", "RENDER_REPRESENTATIONS","NO_DISPLAY_LABELS","NO_PRESERVE")

# print the messages to the console
print arcpy.GetMessages()

arcpy.CheckInExtension("Foundation")

环境

  • 当前工作空间

许可信息

  • Basic: 否
  • Standard: 需要 Production Mapping
  • Advanced: 需要 Production Mapping

相关主题

  • An overview of the Symbology toolset
  • What are visual specifications?

ArcGIS Desktop

  • 主页
  • 文档
  • 支持

ArcGIS

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

关于 Esri

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