VCS

摘要

VCS 类可提供有关 SpatialReference 对象的垂直坐标系组件的信息。

说明

空间参考包括坐标系和存储以及处理参数(容差和分辨率设置)。 还可能包括垂直坐标系,其中含有关于 z(或垂直)坐标的信息。 例如,点的 z 值为 100.0,但如果不知道其垂直坐标系信息,可能会有以下问题:

  • 距离什么 100.0? 0.0 位置的是什么?
  • 100.0 的单位是什么? 米、英尺、英里?
  • 在哪个方向距离 0.0 为 100.0?

属性

属性说明数据类型
datumName
(可读写)

垂直坐标系基准面的名称。

String
direction
(可读写)

z 坐标的正向;1 表示向上,-1 表示向下(沿重力方向)。

Integer
factoryCode
(可读写)

垂直坐标系的工厂代码或 WKID。

Integer
linearUnitName
(可读写)

线性单位的名称。

String
metersPerUnit
(可读写)

米/线性单位。

Double
name
(可读写)

垂直坐标系的名称。

String
verticalShift
(可读写)

垂直坐标系的垂直位移。

Double

代码示例

import arcpy

# Create a Spatial Reference (Europe Equidistant Conic) with a vertical coordinate system (EVRF_2007)
sr = arcpy.SpatialReference(102031, 5621)

# Use the SpatialReference as input to a tool
out = arcpy.management.CreateFeatureDataset(outgdb, "euro_fds", sr)

# Describe the output to confirm the vertical coordinate system factoryCode
sr = arcpy.Describe(out[0]).spatialReference
print(sr.VCS.factoryCode)  # prints 5621