创建自定义地理(坐标)变换 (Data Management)

许可等级:BasicStandardAdvanced

摘要

可创建一种变换方法,用于在两个地理坐标系或基准面之间对数据进行转换。对于任何参数要求进行地理变换的工具,都可使用此工具的输出作为变换方法。

用法

语法

CreateCustomGeoTransformation_management (geot_name, in_coor_system, out_coor_system, custom_geot)
参数说明数据类型
geot_name

自定义变换方法的名称。

所有自定义地理(坐标)变换文件均以扩展名 .gtf 进行保存,并保存在用户 Application Data 文件夹下的 ESRI\<ArcGIS 产品>\ArcToolbox\CustomTransformations 文件夹。如果 CustomTransformations 文件夹不存在,此工具会自动创建。如果 Application Data 文件夹为只读或已隐藏,则输出会创建到用户临时文件夹下的 ArcToolbox\CustomTransformations 中。Application Datatemp 文件夹的位置或名称取决于操作系统。

  • 在任何 Windows 操作系统中,Application Data 文件夹都位于 %appdata%,用户的 Temp 文件夹位于 %temp%
  • 在 Unix 系统中,tmpApplication Data 文件夹位于用户的主目录中,分别在 $HOME$TMP 下。

String
in_coor_system

起始地理坐标系。

Coordinate System
out_coor_system

最终地理坐标系。

Coordinate System
custom_geot

将 METHOD 和 PARAMETER 的值嵌入针对自定义变换 GEOGTRAN 的字符串中。设置方法的名称时,可供选择的方法有 Geocentric_Translation、Molodensky、Molodensky_Abridged、Position_Vector、Coordinate_Frame、Molodensky_Badekas、NADCON、HARN、NTV2、Longitude_Rotation、Unit_Change 和 Geographic_2D_Offset。每种方法都有一组特定的参数,您可以通过在自定义地理变换的整个字符串表示内的参数名称旁输入文本来编辑参数值。请参阅以下 Python 实例中的示例。

String

代码实例

CreateCustomGeoTransformation 示例(Python 独立脚本)

以下独立脚本使用 CreateCustomGeoTransformation 函数创建一个具有特定用途的自定义转换。输出是在默认目录下创建的 *.gtf 文件。

# Name: CreateCustomGeographicTransformation.py
# Description: Creates a custom geographic transformation in the default directory.


# import system modules
import arcpy

# set the variables
geoTransfmName = "cgt_geocentric2"
inGCS = "GEOGCS['GCS_Tokyo',DATUM['D_Tokyo',SPHEROID['Bessel_1841',6377397.155,299.1528128]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
outGCS = "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]"
customGeoTransfm = "GEOGTRAN[METHOD['Geocentric_Translation'],PARAMETER['X_Axis_Translation',''],PARAMETER['Y_Axis_Translation',''],PARAMETER['Z_Axis_Translation','']]"

arcpy.CreateCustomGeoTransformation_management(geoTransfmName, inGCS, outGCS, customGeoTransfm)

环境

相关主题

许可信息

ArcGIS for Desktop Basic:是
ArcGIS for Desktop Standard:是
ArcGIS for Desktop Advanced:是
9/15/2013