Select to view content in your preferred language

TIP: Custom Geographic Transformation used with ProjectRaster_management

1836
1
03-03-2011 01:09 PM
MikeQuentel
Emerging Contributor
For arcpy.ProjectRaster_management in ArcGIS 10, it is possible to use a custom transformation by specifying the name of the *.gtf file (but without the extension "gtf") that represents the custom transformation. For example, if my custom GTF file is called "task_geo.gtf", then I would use:

arcpy.ProjectRaster_management(sampleRasterPath, outputRasterPath, outputPrj, resampling_algorithm, "#", "task_geo", "#", "#")

The GTF files are saved in the following directory path on Windows XP:

C:\Documents and Settings\[username]\Application Data\ESRI\Desktop10.0\ArcToolbox\CustomTransformations\
0 Kudos
1 Reply
MikeQuentel
Emerging Contributor
Also, the GTF file can be successfully created from a python script, which will write the GTF file to the same location mentioned above, in Windows XP.

[INDENT]arcpy.CreateCustomGeoTransformation_management(transformation, inGCS, outGCS, customGeoTransfm)[/INDENT]

The Documents and Settings\[user] is really the system variable %USERPROFILE% on both Windows XP and Windows 7.
0 Kudos