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