# Error 000365 on Custom Geographic Transformation

1079
4
03-21-2018 12:20 PM
New Contributor III

I am working on a script to project the contents of a geodatabase from NAD 1983 UTM Zone 17N to NAD 1983 CSRS UTM Zone 17N and apply an already created custom geographic transformation (using the ntv2 grid shift file for Ontario - ON83CSv1.gsb). The transformation fails with:

"ERROR 000365: Invalid geographic transformation".

I have tried the transformation name and also the full path to the gtf file. I have even tried creating a transformation file in python, but all fail with this error. Applying the transformation in ArcMap, using the Project tool manually or in Model Builder, works fine. I see several threads on this error but none have lead me to a solution. Any ideas?

#Set var for output coordinate systems
out_coords = arcpy.SpatialReference(r"H:\ArcTesting\CSRS\NAD 1983 CSRS UTM Zone 17N.prj")

#Set var for custom geographic transformation
...
arcpy.Project_management(fc, fc_temp_name, out_coords, customGT)
Tags (3)
1 Solution

Accepted Solutions
New Contributor III

Ok. My bad. I just tried executing the script from ArcMap and it worked so I knew I was missing something file based. Turns out I had my project interpreter pointing to the ArcGIS Pro python 3 directory, but I had not yet set up the transformation files in Pro. So I was asking it to apply a transformation that didn't exist as far as the Pro python env was concerned. I copied my gsb and gtf files to the corresponding locations in Pro directories and it works. I'm still interested in why a complete file path did not work but there you go.

4 Replies
MVP Esteemed Contributor

MKennedy-esristaff‌ could you have a look at this please

New Contributor III

Ok. My bad. I just tried executing the script from ArcMap and it worked so I knew I was missing something file based. Turns out I had my project interpreter pointing to the ArcGIS Pro python 3 directory, but I had not yet set up the transformation files in Pro. So I was asking it to apply a transformation that didn't exist as far as the Pro python env was concerned. I copied my gsb and gtf files to the corresponding locations in Pro directories and it works. I'm still interested in why a complete file path did not work but there you go.

Esri Notable Contributor

Hi Piper,

The software is not designed to handle a full path. It's designed to look for a set of data, structured in a certain way. Some methods are even designed to look for certain folders (NTv2, NADCON, HARN, the file-based vertical methods).

Melita

New Contributor III

Hi Melita, thanks for that explanation. I had followed some threads that hinted at trying full paths, but they were generally related to projectections rather than transformations, and looking at the structure, I do see why it didn't work in my case. Much appreciated!