I have a script that goes through all the rasters in a particular folder and then reprojects it to another coordinate system, using arcpy.
My problem is that i keep on getting the following:
ERROR 000365: Invalid geographic transformation.
My code fails on this line
arcpy.ProjectRaster_management(raster, in_memoryLayer, "British National Grid.prj","#", "#", transformation,"#", "#")
I have set the transformation to the following
transformation = "OSGB_1936_To_WGS_1984_7"
and have also tried
transformation = "PROJCS['British_National_Grid',GEOGCS['GCS_OSGB_1936',DATUM['D_OSGB_1936',SPHEROID['Airy_1830',6377563.396,299.3249646]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',400000.0],PARAMETER['False_Northing',-100000.0],PARAMETER['Central_Meridian',-2.0],PARAMETER['Scale_Factor',0.9996012717],PARAMETER['Latitude_Of_Origin',49.0],UNIT['Meter',1.0]]", "NEAREST", "0.516860387597052", "OSGB_1936_To_WGS_1984_7", "", "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433],METADATA['World',-180.0,-90.0,180.0,90.0,0.0,0.0174532925199433,0.0,1262]]"
I got the above from exporting a model from modelbuilder.
but i still get the error.
Here is the code for the ProjectRaster tool that is exported from ModelBuilder
arcpy.ProjectRaster_management(inputRaster, convertedRaster, "PROJCS['British_National_Grid',GEOGCS['GCS_OSGB_1936',DATUM['D_OSGB_1936',SPHEROID['Airy_1830',6377563.396,299.3249646]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',400000.0],PARAMETER['False_Northing',-100000.0],PARAMETER['Central_Meridian',-2.0],PARAMETER['Scale_Factor',0.9996012717],PARAMETER['Latitude_Of_Origin',49.0],UNIT['Meter',1.0]]", "NEAREST", "0.521227542928997", "OSGB_1936_To_WGS_1984_7", "", "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433],METADATA['World',-180.0,-90.0,180.0,90.0,0.0,0.0174532925199433,0.0,1262]]")
The above does not work when running from python, but the model itself does.
Any advice on where I'm going wrong?

in_memoryinputs and outputs? I know the regular project tool cannot usein_memorydatasets for inputs and outputs. – dmahr Mar 06 '13 at 18:33"c:/ArcGIS/projections and coordinates or whatever/British National Grid.prj"– Jason Bellino Mar 06 '13 at 21:42