Issues with Create Ortho Corrected Raster python scripting

Discussion created by corea on Jul 5, 2011
A python 2.6.5 / ArcGIS 10 solution is preferred.

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 TFwx created in the georeferencing process and requires us to Rectify-->Save As

I found a tool to do this "Create Ortho Corrected Raster Dataset" but the python script for it gives errors when I try.

import arcpy
import glob
import os

path = os.getcwd()
filename = path+"\Stage2_19"
#for pathname, directories, filenames in os.walk(path):
#    for filename in filenames:
#        if filename.lower().endswith(".TIF"):
                                                   "CONSTANT_ELEVATION", "0",\

print "Created: " + filename + ".jpg"

Traceback (most recent call last):
  File "Q:\Software\GIS\ESRI\ArcGIS10\CustomScripts\temp\", line 16, in <module>
  File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\", line 7815, in CreateOrthoCorrectedRasterDataset
    raise e
ExecuteError: ERROR 000425: Failed to create ortho-corrected raster dataset
Failed to execute (CreateOrthoCorrectedRasterDataset).