tut: Georef

How to GeoReference an Image...

Steps for Geo-Referencing an Image to a known coordinate system in ArcGIS

1. Set Up the Map Project

  • Prepare an ArcMap project including relevant basemap themes. These layers will be the source of your ground control data – that which you will ‘snap’ the un-registered image to. Thus you want base layers that contain similar corresponding features as are found in your image (for example, Buildings, Parcels, Roads, Cities, States, etc.). This might also be a point layer of GPS locations you have collected that match features found on the image. Using hollow fills for your polygons and contrasting colors (different from those on the image to be georeferenced) will help in your later process of identifying and joining image features to GIS data features.
  • Add the image to your ArcMap project (if it is a R-G-B composite image be sure to include all of the layers, not just one of the bands).  If prompted to ‘Build pyramids,’ select OK.  This will create a reduced-resolution data structure which allows the optimal display of the image at all scales.  In other words, lower resolution versions of the image are shown when the image is zoomed-out, so as to minimize the time it takes to display the image.
  • Zoom to the extent of the image (right-click / Zoom to layer).  Note that the upper-left corner of the image probably has coordinate values of 0, 0 (the intersection of the equator and the prime meridian, or 0˚ latitude by 0˚ longitude if you are in lat-long, or the 0.mxd is using…).  This is because there is no geographic coordinate system associated with the image.  It is stored in ‘raw’ or ‘board’ coordinates only.  It certainly does not ‘line up’ with any of your GIS data layers. The numbers associated with the image are not coordinates at all, but rather simply pixel counts (the number of rows and columns).
  • Zoom to the approximate real-world extent of the image (using your GIS basemap data). Use the GIS features to guide you in zooming/panning to the approximate location of where your image should be. This doesn't need to be perfect, just get close for now.

 

2. Use the Georeferencing Toolbar to Add Links

  • Add the ‘Georeferencing’ toolbar to your project.  (View / Toolbars / Georeferencing)
  • Make sure that your image file is the selected Layer in the Georeferencing toolbar
  • Shift the image to the general vicinity of your basemap:  in the Georeferencing drop-down menu choose Fit to display (this should re-scale your image so that it fits into the area your map is currently zoomed to, which should be close enough to begin building a series of links between the image and the GIS data.
  • Add ‘links’ to align the image to the GIS data
    • You’ll be making ample use of the zoom and pan tools to work your way around the image
    • Select the Add Control Points tool (red and green crosses joined by a line) which is used to link your image to the GIS data
    • Click once on a recognizable feature on the image (a green crosshair will mark this location on the map), then click once on the corresponding feature location on the basemap (a red crosshair).  The image will immediately shift, ‘stitching’ itself to the basemap so the green and red crosshairs line up at that point.
    • Repeat this process of choosing a location on your image and the corresponding location on the GIS data again and again and again for a total of 5 to 15 points.  Select points distributed throughout the image – edges and middle
    • You can (and should) be zooming in as close as you can for every link you create to get the best accuracy possible
    • When you choose a feature (such as a city or road) make sure you are using the correct city/road in both the image file and your GIS data layers. Use the Identify tool to verify city or road names, etc.
    • Make sure you always click on your image location first before you click on your GIS data location (you always link from the non-georeferenced image to the georeferenced data). Clicking in the wrong order will greatly mess things up…
    • The first few links will be a challenge to match features, but the more links are built, the closer the image should get to being correctly registered to the basemap, making subsequent links easier and easier to add. You may even wish to go back later and re-do early links (improving their accuracy). After about 5 links, your points should begin to fall almost directly on top of one another.
    • With each additional link your image alignment should improve. If you feel that one point is hurting rather than helping you can open the Link Table (see below), and identify, select and delete an offending link.

 

3. The Links Table

  • Behind the scenes, ArcMap has been building a table of links between the image and map data.  The table holds X and Y coordinates of the image locations (in pixel row and column numbers) and GIS map locations (in real-world coordinates).  Open this table by clicking on the View Link Table icon on the far right of the Georeferencing toolbar.
  • As you add points, ArcMap creates and revises two least-squares-fit equations (one for x values, the other for y) to translate the image coordinates into map coordinates.  Depending upon the number of links you’ve added, you can fit first, second, or third order equations to the data. 
    • A first order, affine transformation, will simply shift (up-down-left-right), stretch (bigger-smaller) and if necessary, skew (rotate), the entire image using a single equation.
    • Second and third order transformations fit higher order polynomial equations to the data, allowing points to be shifted in a non-uniform manner (i.e., points on one location of the photo may be moved relatively more or less distances than other locations)
  • You can switch from a 1st order to a 2nd order or a 3rd order transformation in the Links Table Transformation drop down box or the Georeferencing toolbar drop down menu (Transformation / ).
  • Experiment with 1st, 2nd, and 3rd order transformations to see the differences and to choose which one does the best job of fitting the image to your GIS data (probably this will be the 1st or 2nd order transformation). Note that higher order transformations require a greater number of control points (links).
  • The table also presents the ‘residual’ error associated with each point.  This represents the distance in map units between the location of the image point as calculated by the polynomial fit equation, and the location of the point as you specified when you clicked on the GIS data.  Any links with high residual errors should be re-evaluated and/or removed.  To remove a link, simply highlight it (click on it) in the Links Table and then hit the delete ‘X’ button.  The equation will immediately be recalculated.
  • The table also presents the overall ‘root mean square’ error (Total RMS) associated with your combined control points. This is the mean (average) of the deviations of all your control points from their calculated locations. 
  • Remove and add links as necessary until you have achieved an adequately low error for both the individual points and the overall RMS.

 

4. Finalize Your Georeferencing

  • Use the Link Table’s Save button to write the XY coordinate pairs to a text file.  This file contains the results of your efforts, and allows you to re-reference the image at a later time if need be.  Make sure you store it in your project folder as a backup.
  • Use the georeferencing menu’s Update Georeferencing option on to finalize your work.  If you are performing a 1st order transformation this creates a ‘world file’ which will have the same name as your image but with a .jgw (jpeg world file) or .tfw (.tiff world file) extension, and will be stored in the same directory as your original image file. A world file is a small text file that contains the parameters of the transformation equation which fits the image to its location on the map base.  If you are performing higher order transformations, this 'world file' information will be stored in the auxiliary (.aux) file, again in the same directory as the original image and with the same file name. With either the world file or the .aux file, all future uses of the image will be able to locate the image correctly in real world coordinates. Note that only ArcGIS products reorganize and read an .aux file. If you are planning to use your georeferenced file outside of ArcGIS you should either use a 1st order transformation (creating a world file) or use the Rectify option (see below).
  • OPTIONAL: If you wish to make an entirely new georeferenced .tif file (or a GRID or an .img file), you can use the Rectify option on the Georeferencing toolbar drop down menu. This will use your links file to generate a new raster dataset, with proper coordinates included. Note that these files (especially .tif files) can be quite a bit larger than your original image. ArcMap will display the original image (using your new world file) without this Rectify process. The reasons for using Rectify would be if you needed to use the image for spatial analysis (overlay with other raster data, etc.) or wanted to use the image in another software package that did not recognize the image and/or world file data format.

 

 

See Also:

  • ArcGIS Help files: Georeferencing (Fundamentals, Vocabulary, Toolbar...)