Summary
Creates a transformation method for converting data between two geographic coordinate systems or datums. The output of this tool can be used as a transformation method for any tool with a parameter that requires a geographic transformation.
Usage
All custom geographic transformation files are saved with a .gtf extension and stored in the ESRI\<ArcGIS product>\ArcToolbox\CustomTransformations folder under the user's Application Data folder. The CustomTransformations folder is created by the tool if it does not exist. If the Application Data folder is read-only or hidden, the output is created in ArcToolbox\CustomTransformations under the user's temp folder. The location or name of the Application Data and temp folders is dependent on the operating system.
- In any Windows operating system the Application Data folder is located at %appdata% and the user's Temp folder is located at %temp%. Entering%appdata% in a command window it will return the AppData file location. Entering %temp% will return the temp folder location.
- In Unix systems, the tmp and Application Data folders are located in the user's home directory, under $HOME and $TMP, respectively. Typing /tmp in a terminal will return the location.
Any geoprocessing tool that uses geographic transformations will look at all custom transformations in the default storage location and present them as valid transformation options on the dialog box under the Geographic Transformation parameter's drop-down list.
Custom transformation files can't be edited. They are binary files that store version and string length information that may be corrupted if edited outside of the geoprocessing framework. To update the file you should create a new custom geographic transformation and overwrite the existing file.
Syntax
CreateCustomGeoTransformation(geot_name, in_coor_system, out_coor_system, custom_geot)
Parameter | Explanation | Data Type |
geot_name | Name of the custom transformation method. All custom geographic transformation files are saved with a .gtf extension and stored in the ESRI\<ArcGIS product>\ArcToolbox\CustomTransformations folder under the user's Application Data folder. The CustomTransformations folder is created by the tool if it does not exist. If the Application Data folder is read-only or hidden, the output is created in ArcToolbox\CustomTransformations under the user's temp folder. The location or name of the Application Data and temp folders is dependent on the operating system.
| String |
in_coor_system | The starting geographic coordinate system. | Coordinate System |
out_coor_system | The final geographic coordinate system. | Coordinate System |
custom_geot | Set the METHOD and PARAMETER values wrapped in a string for custom transformation GEOGTRAN. Set the name of the method from the available methods of Geocentric_Translation, Molodensky, Molodensky_Abridged, Position_Vector, Coordinate_Frame, Molodensky_Badekas, NADCON, HARN, NTV2, Longitude_Rotation, Unit_Change, and Geographic_2D_Offset. Each method has its own sets of parameters—you can edit the values of the parameters by entering text next to the name of the parameter within the whole string representation of the custom geographic transformation. See examples in the Python sample below. | String |
Code sample
CreateCustomGeoTransformation Example (Python stand-alone script)
The following stand-alone script uses the CreateCustomGeoTransformation function to create a custom transformation for a particular use case. The output is a *.gtf file created in the default directory.
# Name: CreateCustomGeographicTransformation.py
# Description: Creates a custom geographic transformation in the default directory.
# import system modules
import arcpy
# set the variables
geoTransfmName = "cgt_geocentric2"
# create a spatial reference object for GCS_Tokyo
inGCS = arcpy.SpatialReference("Tokyo")
# create a spatial reference object for GCS_WGS_1984
outGCS = arcpy.SpatialReference("WGS 1984")
customGeoTransfm = "GEOGTRAN[METHOD['Geocentric_Translation'],PARAMETER['X_Axis_Translation',''],PARAMETER['Y_Axis_Translation',''],PARAMETER['Z_Axis_Translation','']]"
arcpy.CreateCustomGeoTransformation_management(geoTransfmName, inGCS, outGCS, customGeoTransfm)
Environments
This tool does not use any geoprocessing environments.
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes