I have georeferenced a few hundred survey plans using the Georeferencing toolbar in ArcGIS but did not Rectify the images (i.e create a new image) as I didn't want to create new files and take up more space. Now when I want to open them up in ERDAS or MapInfo they don't accept the tfw/xml created in the georeferencing process and require a file created using - Georeferencing toolbar-->Rectify-->Save AsI found a tool that should do this -"Create Ortho Corrected Raster Dataset" but the tool and python script for it gives errors when I try. When I try it from within ArcMap it just hangs for hours with no processing active.
import arcpy, glob, os
path = os.getcwd()
files = glob.glob('*.tif')
for file in files:
fileTIF=path+"\\"+file
fileJPG=path+"\\"+file+".jp2"
print fileTIF, fileJPG
arcpy.CreateOrthoCorrectedRasterDataset_management(fileTIF,fileJPG,"CONSTANT_ELEVATION", "1")
arcpy.GetMessages()
print arcpy.GetMessages()
print "Created: " + fileJPG
>>>
C:\Python26\script_tests\rectify\Stage1_01a.TIF C:\Python26\script_tests\rectify\Stage1_01a.TIF.jp2
Traceback (most recent call last):
File "C:\Python26\script_tests\rectify\rectify.py", line 12, in <module>
arcpy.CreateOrthoCorrectedRasterDataset_management(fileTIF,fileJPG,"CONSTANT_ELEVATION", "1")
File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\management.py", line 7815, in CreateOrthoCorrectedRasterDataset
raise e
ExecuteError: ERROR 000425: Failed to create ortho-corrected raster dataset
Failed to execute (CreateOrthoCorrectedRasterDataset).