I have a large list of raster images (>600) I would like to automatically georeference to a source image.

I can do this in ArcGIS 10.2 using the Auto Registration tool for each image but looking for a way to iterate it in ModelBuilder/python script.

Is there an arcpy command or similar for the auto registration tool?

  • This might help: gis.stackexchange.com/questions/107008/… – Mr. Che Dec 8 '15 at 5:10
  • Full story please. Are they in the same place? Do you have some sort of regularity, e.g. coded in names or mesh of extents? – FelixIP Dec 8 '15 at 5:34
  • You said you have a large list ? My question to you is where does they came from ? – PROBERT Dec 8 '15 at 16:32
  • The 600+ images are roughly similar (sequential names). They are frame grabs from a video taken obliquely from a drone. Drone moves +- 5 m. So I cant use warp from file... Im actually after the code behind the auto registration tool. I would like to create automatic links between each of the images and a reference one, sort the links by total RMSE and choose the best 10 or so and apply a 2nd order polynomial transformation. – Javier Dec 9 '15 at 6:26

If you are referring to the Register Raster tool in ArcToolbox, and you know the input parameters for the tool you can place all your files in a single directory, get all the files, and feed them into the tool in a loop. Here is some untested code to get you started...

import arcpy, traceback, sys, os

folderofimagesfiles = r"Z:\GISpublic\GerryG\Restoration\MackayFlight20151202\Images"

    for root, dirs, files in os.walk(folderofimagesfiles):
            for file in files:
                thisfile = os.path.join(root, dirs, file)
                arcpy.RegisterRaster_management(thisfile, "Place", "Your", "Parameters", "Here")

except arcpy.ExecuteError: 
    msgs = arcpy.GetMessages(2) 
    print msgs
    tb = sys.exc_info()[2]
    tbinfo = traceback.format_tb(tb)[0]
    pymsg = "PYTHON ERRORS:\nTraceback info:\n" + tbinfo + "\nError Info:\n" + str(sys.exc_info()[1])
    msgs = "ArcPy ERRORS:\n" + arcpy.GetMessages(2) + "\n"
    print pymsg + "\n"
    print msgs
  • Thanks but I'm actually referring to the Auto registration icon from the Georeferencing toolbar – Javier Jan 5 '16 at 5:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.