| 标注 | 说明 | 数据类型 | 
输入表  | 包含源坐标的表。  | Table View | 
输出方位线要素类  | 包含输出方位线的要素类。  | Feature Class | 
X 字段(经度、UTM、MGRS、USNG、GARS、GEOREF)  | 输入表中包含 x 或经度坐标的字段。  | Field | 
方位角字段  | 输入表中包含方位角值的字段。  | Field | 
距离字段  | 输入表中包含距离值的字段。  | Field | 
输入坐标格式  | 指定输入表坐标的格式。 
  | String | 
方位角单位 (可选)  | 指定方位角的测量单位。 
  | String | 
距离单位 (可选)  | 指定距离的测量单位。 
  | String | 
Y 字段(纬度) (可选)  | 输入表中包含 y 或纬度坐标的字段。 当输入坐标格式参数设置为十进制度 - 两个字段、度和十进制分 - 两个字段或度分秒 - 两个字段时,将使用 Y 字段(纬度)参数。  | Field | 
线类型 (可选)  | 指定输出线类型。 
  | String | 
输出坐标系 (可选)  | 输出要素类的空间参考。 默认值为 GCS_WGS_1984。  | Spatial Reference | 
摘要
可根据表中存储的坐标创建方位线。
使用情况
输出线要素类将同时具有方位角和距离值的字段。
参数
arcpy.defense.CoordinateTableToLineOfBearing(in_table, out_feature_class, x_or_lon_field, bearing_field, distance_field, in_coordinate_format, {bearing_units}, {distance_units}, {y_or_lat_field}, {line_type}, {coordinate_system})| 名称 | 说明 | 数据类型 | 
in_table  | 包含源坐标的表。  | Table View | 
out_feature_class  | 包含输出方位线的要素类。  | Feature Class | 
x_or_lon_field  | 输入表中包含 x 或经度坐标的字段。  | Field | 
bearing_field  | 输入表中包含方位角值的字段。  | Field | 
distance_field  | 输入表中包含距离值的字段。  | Field | 
in_coordinate_format  | 指定输入表坐标的格式。 
  | String | 
bearing_units (可选)  | 指定方位角的测量单位。 
  | String | 
distance_units (可选)  | 指定距离的测量单位。 
  | String | 
y_or_lat_field (可选)  | 输入表中包含 y 或纬度坐标的字段。 当 in_coordinate_format 参数设置为 DD_2、DDM_2 或 DMS_2 时,将使用 y_or_lat_field 参数。  | Field | 
line_type (可选)  | 指定输出线类型。 
  | String | 
coordinate_system (可选)  | 输出要素类的空间参考。 默认值为 GCS_WGS_1984。  | Spatial Reference | 
代码示例
以下 Python 窗口脚本演示了如何使用 CoordinateTableToLineOfBearing 函数。
import arcpy
arcpy.env.workspace = r"C:/Data.gdb"
arcpy.CoordinateTableToLineOfBearing_defense(r"C:CSV/TableToLineOfBearing.csv",
                                             "LOB",
                                             "x",
                                             "Orientation",
                                             "Distance",
                                             "DD_2",
                                             "DEGREES",
                                             "KILOMETERS",
                                             "y")以下示例将在示例工作流脚本中使用 CoordinateTableToLineOfBearing 函数。
# Description: Create lines of bearing from tabular data and then create 
#              bounding envelopes around each line.
# Import system modules
import arcpy
# Set environment settings
arcpy.env.workspace = r"C:/Data.gdb"
arcpy.env.overwriteOutput = True
# Create lines of bearing
input_table = r"C:/CSV/TableToLineOfBearing.csv"
result_line = "Output_LOB"
arcpy.CoordinateTableToLineOfBearing_defense(input_table,
                                             result_line,
                                             "x",
                                             "Orientation",
                                             "Distance",
                                             "DD_2",
                                             "DEGREES",
                                             "KILOMETERS",
                                             "y")
# Create envelopes
result_envelope = "Output_Envelope"
arcpy.FeatureEnvelopeToPolygon_management(result_line, result_envelope)