ListTransformations
汇总
返回有效变换方法列表。 对于某个特定的地理区域,可以使用区域范围来缩小有效变换方法列表的范围。
最合适的变换通常是返回列表中的第一个。 该列表按数据与变换使用区域的重叠数量进行排序。 如果两个或多个变换与数据的重叠数量相同,则变换精度值将用作辅助排序参数。
语法
ListTransformations(from_sr, to_sr, {extent}, {vertical}, {first_only})
| 参数 | 说明 | 数据类型 |
|---|---|---|
|
from_sr |
The starting geographic coordinate system. This can be specified with a |
SpatialReference |
|
to_sr |
The final geographic coordinate system. This can be specified with a |
SpatialReference |
|
extent |
Only transformations that span the entire extent will be returned. The extent needs to be specified in coordinates from the |
Extent |
|
vertical |
Specifies whether to return a list of vertical or horizontal transformations. By default, the function returns transformations that ignore vertical coordinate systems on the The function returns only one type of transformation. If set to To use To use a transformation result as input to the Project tool, the tool's (默认值为 False) |
Boolean |
|
first_only |
Specifies whether to limit the list of transformations to a single item or return all valid transformations. This is a performance optimization. (默认值为 False) |
Boolean |
返回值
| 数据类型 | 说明 |
|---|---|
|
String |
作为字符串的有效变换方法的列表。 |
代码示例
使用 ListTransformations 函数确定可用于从一个坐标系投影到另一个坐标系的有效变换。
import arcpy
from_sr = arcpy.SpatialReference('WGS 1984')
to_sr = arcpy.SpatialReference('NAD 1927 StatePlane California VI FIPS 0406')
extent = arcpy.Extent(-178.217598182, 18.9217863640001,
-66.969270909, 71.4062354550001)
transformations = arcpy.ListTransformations(from_sr, to_sr, extent)