ListTransformations
Summary
Returns a list of valid transformation methods. An extent can be used to narrow the list of valid transformation methods for a specific geographic area.
The most appropriate transformation is usually the first one in the returned list. The list is sorted by amount of overlap of the data versus the areas of use of the transformations. If two or more transformations have the same amount of overlap with the data, the transformation accuracy values are used as a secondary sort parameter.
Syntax
ListTransformations(from_sr, to_sr, {extent}, {vertical}, {first_only})
| Parameter | Explanation | Data Type |
|---|---|---|
|
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 The default value is 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. The default value is False. |
Boolean |
Return value
| Data Type | Explanation |
|---|---|
|
String |
A list of valid transformation methods as strings. |
Code sample
Use the ListTransformations function to identify valid transformations for projecting from one coordinate system to another.
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)