Error 000365 on Custom Geographic Transformation

1079
4
Jump to solution
03-21-2018 12:20 PM
PiperMcKinnon1
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
#customGT = r"C:\Users\pm506\AppData\Roaming\ESRI\Desktop10.5\ArcToolbox\CustomTransformations\NAD83_to_NAD83CSRS.gtf"
customGT = "NAD83_to_NAD83CSRS"
...
arcpy.Project_management(fc, fc_temp_name, out_coords, customGT)
0 Kudos
1 Solution

Accepted Solutions
PiperMcKinnon1
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.

View solution in original post

4 Replies
DanPatterson_Retired
MVP Esteemed Contributor

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

0 Kudos
PiperMcKinnon1
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.

MelitaKennedy
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

PiperMcKinnon1
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! 

0 Kudos