对齐标记 (制图)

许可等级:BasicStandardAdvanced

摘要

将点要素类的制图表达标记符号与指定搜索距离内某个线或面要素类中最近的笔划或填充制图表达符号对齐。

插图

Illustration of aligning markers to stroke
Align markers to stroke with different options

用法

语法

AlignMarkerToStrokeOrFill_cartography (in_point_features, in_line_or_polygon_features, search_distance, {marker_orientation})
参数说明数据类型
in_point_features

包含标记制图表达的输入点要素图层。

Layer
in_line_or_polygon_features

包含笔划或填充制图表达的输入线或面要素图层。

Layer
search_distance

图形标记边到图形笔划边之间的搜索距离。必须指定大于或等于零的搜索距离。

Linear unit
marker_orientation
(可选)

指定相对于笔划或填充边的制图表达标记方向。

  • PERPENDICULAR将制图表达标记与笔划或填充边垂直对齐。这是默认设置。
  • PARALLEL将制图表达标记与笔划或填充边平行对齐。
String

代码实例

AlignMarkerToStrokeOrFill 工具示例(Python 窗口)

此独立脚本显示的是使用 AlignMarkerToStrokeOrFill 工具的示例。

import arcpy
from arcpy import env
env.workspace = "C:/data"
env.referenceScale = "50000"
arcpy.AlignMarkerToStrokeOrFill_cartography("buildings.lyr", "roads.lyr", "2 Points", "PERPENDICULAR")
AlignMarkerToStrokeOrFill 工具示例(独立 python 脚本)

此独立脚本显示的是使用 AlignMarkerToStrokeOrFill 工具的示例。

# Name: AlignMarkerToStrokeOrFill_standalone_script.py
# Description: Aligns representation markers to nearby line or polygon features symbolized with representations
# Author: ESRI
 
# Import system modules
import arcpy
from arcpy import env

# Set environment settings
env.workspace = "C:/data"
env.referenceScale = "50000"

# Set local variables
in_point_features = "buildings.lyr"
in_line_or_polygon_features = "roads.lyr"
search_distance = "2 Points"
marker_orientation = "PERPENDICULAR"

# Execute Align Marker To Stroke Or Fill
arcpy.AlignMarkerToStrokeOrFill_cartography(in_point_features, in_line_or_polygon_features, search_distance, marker_orientation)

环境

相关主题

许可信息

ArcGIS for Desktop Basic: 否
ArcGIS for Desktop Standard: 否
ArcGIS for Desktop Advanced: 是
5/10/2014