I have a set of images that I need to georeference. All images have the exact same geographical coverage. I have used the georeferenceing tool bar to create a link file.
I then used the script suggested in Batch Georeferencing in ArcMap/ArcPy? to loop through the images.
arcpy.env.workspace = r"inputFolderPath" # Folder with rasters to be georeferenced"
arcpy.env.outputCoordinateSystem = r"pathToLinkTable.prj" #output projection
OutF = r"pathToOutputWorkspace" # Output folder
Ext = ".tif" # Format of the output rasters
LinkFile = r"pathToLinkFile.txt" # Your link file
Transf = "POLYORDER0"
Resampl = "NEAREST"
# Process
ListRas = arcpy.ListRasters()
for ras in ListRas:
basename = arcpy.Describe(ras).baseName
outpath = os.path.join(OutF, basename + Ext)
arcpy.WarpFromFile_management(ras, outpath, LinkFile, Transf, Resampl)
print "Georeferenced {} successfully".format(basename)
All images are processes, however the output images/rasters are not in the expected geographic location.
I cannot see where the issue is. It must be in the source points/map points, but I am using the link table... any ideas what I should try next?
I am running the script in IDLE, as the python command line crashes when I try to run anything (unrelated issue but relevant information).