ListTransformations

Эта документация ArcGIS 3.0 была перемещена в архив и более не обновляется. Ресурсы и ссылки могут быть устаревшими. См. самую последнюю документацию.

Краткая информация

Возвращает список корректных методов трансформации. Можно использовать экстент для сокращения списка допустимых методов трансформации для определенной географической области.

Наилучшим образом обычно подходит первое в списке преобразований. Список отсортирован по количеству совпадений данных в зависимости от областей использования преобразований. Если два или больше преобразований одинаково перекрываются с данными, значения точности преобразования используется используются в качестве вторичного параметра сортировки.

Более подробно о географическом преобразовании датума

Синтаксис

ListTransformations (from_sr, to_sr, {extent}, {vertical}, {first_only})
ПараметрОписаниеТип данных
from_sr

The starting geographic coordinate system. This can be specified with a SpatialReference object, the name of the spatial reference, or a path to a projection file (.prj).

SpatialReference
to_sr

The final geographic coordinate system. This can be specified with a SpatialReference object, the name of the spatial reference, or a path to a projection file (.prj).

SpatialReference
extent

Only transformations that span the entire extent will be returned. The extent needs to be specified in coordinates from the from_sr. When working with data, the extent on a Describe object can be used.

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 from_sr and to_sr.

The function returns only one type of transformation. If set to False, horizontal transformations will be returned; if set to True, vertical transformations will be returned.

To use True, both the from_sr and to_sr arguments must have a vertical coordinate system.

To use a transformation result as input to the Project tool, the tool's vertical parameter must be set appropriately to NO_VERTICAL or VERTICAL to match the transformation.

(Значение по умолчанию — 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

Используйте функцию 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)

Связанные разделы