Raster data is commonly obtained by scanning maps or collecting aerial photographs and satellite images. Scanned map datasets don't normally contain spatial reference information (either embedded in the file or as a separate file). With aerial photography and satellite imagery, sometimes the location information delivered with them is inadequate, and the data does not align properly with other data you have. Thus, to use some raster datasets in conjunction with your other spatial data, you may need to align or georeference them to a map coordinate system. A map coordinate system is defined using a map projection (a method by which the curved surface of the earth is portrayed on a flat surface).
When you georeference your raster data, you define its location using map coordinates and assign the coordinate system of the data frame. Georeferencing raster data allows it to be viewed, queried, and analyzed with other geographic data. The Georeferencing toolbar allows you to georeference raster datasets, raster layers (which may have raster functions), image services, and raster products.
In general, the steps for georeferencing a raster dataset are the following:
- In ArcMap, add the raster that you want to align with your projected data.
- Add links that connect known raster dataset positions to known positions in map coordinates. The Auto Registration tool can help you automatically create links.
- Save the georeferencing information when you're satisfied with the alignment (also referred to as registration).
- Permanently transform the raster dataset (this is optional).
To watch a demonstration of georeferencing a raster dataset, see the Georeferencing video.
Aligning the raster with control points
Generally, you will georeference your raster data using existing spatial data (target data)—such as georeferenced rasters or a vector feature class—that resides in the desired map coordinate system. The process involves identifying a series of ground control points—known x,y coordinates—that link locations on the raster dataset with locations in the spatially referenced data (target data). Control points are locations that can be accurately identified on the raster dataset and in real-world coordinates. Many different types of features can be used as identifiable locations, such as road or stream intersections, the mouth of a stream, rock outcrops, the end of a jetty of land, the corner of an established field, street corners, or the intersection of two hedgerows.
The control points are used to build a polynomial transformation that will shift the raster dataset from its existing location to the spatially correct location. The connection between one control point on the raster dataset (the from point) and the corresponding control point on the aligned target data (the to point) is a link.
The example below shows a from control point (yellow cross) placed on the vector target data at a street crossing and the associated control point (green cross) placed on the raster dataset. The associated link is represented by the blue line joining the control points.
The number of links you need to create depends on the complexity of the transformation you plan to use to transform the raster dataset to map coordinates. However, adding more links will not necessarily yield a better registration. If possible, you should spread the links over the entire raster dataset rather than concentrating them in one area. Typically, having at least one link near each corner of the raster dataset and a few throughout the interior produces the best results.
Generally, the greater the overlap between the raster dataset and target data, the better the alignment results, because you'll have more widely spaced points with which to georeference the raster dataset. For example, if your target data only occupies one-quarter of the area of your raster dataset, the points you could use to align the raster dataset would be confined to that area of overlap. Thus, the areas outside the overlap area are not likely to be properly aligned.
Keep in mind that your georeferenced data is only as accurate as the data to which it is aligned. To minimize errors, you should georeference to data that is at the highest resolution and largest scale for your needs.
Transforming the raster
When you've created enough links, you can transform—or warp—the raster dataset to permanently match the map coordinates of the target data. You have the choice of using a polynomial, a spline, an adjust, a projective, or a similarity transformation to determine the correct map coordinate location for each cell in the raster.
The polynomial transformation uses a polynomial built on control points and a least-squares fitting (LSF) algorithm. It is optimized for global accuracy but does not guarantee local accuracy. The polynomial transformation yields two formulas: one for computing the output x-coordinate for an input (x,y) location and one for computing the y-coordinate for an input (x,y) location. The goal of the least-squares fitting algorithm is to derive a general formula that can be applied to all points, usually at the expense of slight movement of the to positions of the control points. The number of the noncorrelated control points required for this method must be 1 for a zero-order shift, 3 for a first order affine, 6 for a second order, and 10 for a third order. The lower order polynomials tend to give a random type error, while the higher order polynomials tend to give an extrapolation error.
The first-order polynomial transformation is commonly used to georeference an image. Below is the equation to transform a raster dataset using the affine (first order) polynomial transformation. You can see how six parameters define how a raster's rows and columns transform into map coordinates.
A zero-order polynomial is used to shift your data. This is commonly used when your data is already georeferenced, but a small shift will better line up your data. Only one link is required to perform a zero-order polynomial shift. It may be a good idea to create a few links, then choose the one that looks the most accurate.
Use a first-order or affine transformation to shift, scale, and rotate a raster dataset. This generally results in straight lines on the raster dataset mapped as straight lines in the warped raster dataset. Thus, squares and rectangles on the raster dataset are commonly changed into parallelograms of arbitrary scaling and angle orientation.
With a minimum of three links, the mathematical equation used with a first-order transformation can exactly map each raster point to the target location. Any more than three links introduces errors, or residuals, that are distributed throughout all the links. However, you should add more than three links, because if one link is positionally wrong, it has a much greater impact on the transformation. Thus, even though the mathematical transformation error may increase as you create more links, the overall accuracy of the transformation will increase as well.
The higher the transformation order, the more complex the distortion that can be corrected. However, transformations higher than third order are rarely needed. Higher-order transformations require more links and, thus, will involve progressively more processing time. In general, if your raster dataset needs to be stretched, scaled, and rotated, use a first-order transformation. If, however, the raster dataset must be bent or curved, use a second- or third-order transformation.
The spline transformation is a true rubber sheeting method and optimizes for local accuracy but not global accuracy. It is based on a spline function—a piecewise polynomial that maintains continuity and smoothness between adjacent polynomials. Spline transforms the source control points exactly to target control points; the pixels that are a distance from the control points are not guaranteed to be accurate. This transformation is useful when the control points are important, and it is required that they be registered precisely. Adding more control points can increase overall accuracy of the spline transformation. Spline requires a minimum of 10 control points.
The adjust transformation optimizes for both global LSF and local accuracy. It is built on an algorithm that combines a polynomial transformation and triangulated irregular network (TIN) interpolation techniques. The adjust transformation performs a polynomial transformation using two sets of control points and adjusts the control points locally to better match the target control points using a TIN interpolation technique. Adjust requires a minimum of three control points.
The projective transformation can warp lines so that they remain straight. In doing so, lines which were once parallel may no longer remain parallel. The projective transformation is especially useful for oblique imagery, scanned maps, and for some imagery products such as Landsat and Digital Globe. A minimum of four links are required to perform a projective transformation. When only four links are used, the RMS error will be zero. When more points are used, the RMS error will be slightly above zero.
The similarity transformation is a first order transformation which tries to preserve the shape of the original raster. The RMS error tends to be higher than other polynomial transformations since the preservation of shape is more important than the best fit.
Interpreting the root mean square error
When the general formula is derived and applied to the control point, a measure of the error—the residual error—is returned. The error is the difference between where the from point ended up as opposed to the actual location that was specified—the to point position. The total error is computed by taking the root mean square (RMS) sum of all the residuals to compute the RMS error. This value describes how consistent the transformation is between the different control points (links). When the error is particularly large, you can remove and add control points to adjust the error.
Although the RMS error is a good assessment of the transformation's accuracy, don't confuse a low RMS error with an accurate registration. For example, the transformation may still contain significant errors due to a poorly entered control point. The more control points of equal quality used, the more accurately the polynomial can convert the input data to output coordinates. Typically, the adjust and spline transformations give an RMS of nearly zero or zero; however, this does not mean that the image will be perfectly georeferenced.
The forward residual shows you the error in the same units as the data frame spatial reference. The inverse residual shows you the error in the pixels units. The forward-inverse residual is a measure of how close your accuracy is, measured in pixels. All residuals closer to zero are considered more accurate.
Resampling the raster dataset
When you rectify or transform, project, or resample a raster dataset, convert it from one projection to another, or change the cell size, you are performing a geometric transformation. Geometric transformation is the process of changing the geometry of a raster dataset from one coordinate space to another. Types of geometric transformations include rubber sheeting (usually used for georeferencing), projection (using the projection information to transform the data from one projection to another), translation (shifting all the coordinates equally), rotation (rotating all the coordinates by some angle), and changing the cell size of the dataset.
After the geometric transformation is applied to the input raster, the cell centers of the input raster rarely line up with the cell centers on the output raster; however, values need to be assigned to the centers.
Although you might think each cell in a raster dataset is transformed to its new map coordinate location, the process actually works in reverse. During georeferencing, a matrix of empty cells is computed using the map coordinates. Each empty cell is given a value based on the resampling process.
The three most common resampling techniques are nearest neighbor assignment, bilinear interpolation, and cubic convolution. These techniques assign a value to each empty cell by examining the cells in the ungeoreferenced raster dataset.
Nearest neighbor assignment is the fastest resampling technique and is appropriate for categorical or thematic data, since it does not alter the value of the input cells. Once the location of the cell's center on the output raster dataset is located on the input raster, nearest neighbor assignment determines the location of the closest cell center on the input raster and assigns the value of that cell to the cell on the output raster.
The nearest neighbor assignment does not change any of the values of cells from the input raster dataset. The value 2 in the input raster will always be the value 2 in the output raster; it will never be 2.2 or 3. Since the output cell values remain the same, nearest neighbor assignment should be used for nominal or ordinal data where each value represents a class, member, or classification—this may be categorical data such as a land-use, soil, or forest type.
Bilinear interpolation uses the value of the four nearest input cell centers to determine the value of the output raster. The new value for the output cell is a weighted average of these four values, adjusted to account for their distance from the center of the output cell in the input raster. This interpolation method results in a smoother-looking surface than can be obtained using nearest neighbor.
Since the values for the output cells are calculated according to the relative position and the value of the input cells, bilinear interpolation is preferred for data where the location from a known point or phenomenon determines the value assigned to the cell—that is, continuous surfaces. Elevation, slope, intensity of noise from an airport, and salinity of the groundwater near an estuary are all phenomena represented as continuous surfaces and are most appropriately resampled using bilinear interpolation.
Cubic convolution is similar to bilinear interpolation, except the weighted average is calculated from the 16 nearest input cell centers and their values. Cubic convolution tends to sharpen the data more than bilinear interpolation, since more cells are involved in the calculation of the output value. Therefore, this resampling method is often used when resampling imagery, such as aerial photography and satellite imagery.
Bilinear interpolation or cubic convolution should not be used on categorical data, since the categories will not be maintained in the output raster dataset. However, all three techniques can be applied to continuous data, with nearest neighbor producing a blocky output, bilinear interpolation producing smoother results, and cubic convolution producing the sharpest results. When undertaking a large resampling project, it is recommended that you create a prototype, utilizing more than one of the resampling techniques to make an accurate assessment of the most appropriate method to use for your data.
Should you rectify your raster?
You can permanently transform your raster dataset after georeferencing it by using the Rectify command on the Georeferencing toolbar or by using the Warp tool. You can also store the transformation information in the auxiliary files using the Update Georeferencing command on the Georeferencing toolbar.
Rectifying or warping will create a new raster dataset that is georeferenced using the map coordinates and the spatial reference. You can save this as a BIL, BIP, BMP, BSQ, DAT, GIF, GRID, IMG, JPEG, JPEG 2000, PNG, or TIFF. ArcGIS doesn't require you to permanently transform your raster dataset to display it with other spatial data; however, you should do so if you plan to perform analysis with it or want to use it with another software package that doesn't recognize the external georeferencing information created in the world file.
Updating the georeferencing will store the transformation information in external files—it will not create a new raster dataset, which happens when you permanently transform your raster dataset. For a raster dataset that is file based, such as a TIFF, the transformation will generally be stored in an external XML file—with an .AUX.XML extension. If the raster dataset is a raw image, such as BMP, and the transformation is affine, it will be written to a world file. For a raster dataset in a geodatabase, Update Georeferencing will store the geodata transformation to an internal auxiliary file of the raster dataset. Updating a raster layer, an image service, or a mosaic layer will only update the layer within your map document; it will not save the georeferencing information back to the source.
The table below shows how each type of target will be saved.
Georeferencing various rasters
Update Georeferencing will update the raster dataset.
Update Georeferencing will update the raster layer, and the source rasters will be unaffected.
Image service layer
An image service will not be updated on the server. After you Update Georeferencing you can either save the map document (.mxd) or you can create a layer (.lyr) file to save any georeferencing work.
A raster product will not update the underlying raster dataset files. After you Update Georeferencing you can either save the map document (.mxd) or you can create a layer (.lyr) file to save any georeferencing work.
Raster with a function
A raster function will not update the underlying raster files. After you Update Georeferencing you can either save the map document (.mxd) or you can create a layer (.lyr) file to save any georeferencing work.