The Georeferencer Plugin is a tool for generating world files for rasters. It allows you to reference rasters to geographic or projected coordinate systems by creating a world file, or by transforming the raster to a new coordinate system. The basic approach to georeferencing a raster is to locate points on the raster for which you can accurately determine their coordinates. The source of the coordinates can be:
- The raster itself, sometimes coordinates are literally `written' on the raster. In this case you can enter the coordinates manually.
- Other georeferenced data, this can be either vector or raster data that contain the same objects/features that you have on the raster that you want to georeference. In this case you can enter the coordinates by clicking on the reference dataset loaded in QGIS map canvas.
The usual procedure for georeferencing an image involves selecting multiple points on the raster, specifying their coordinates, and choosing a relevant transformation type. Based on the input parameters and data, the plugin will compute the world file parameters. The more coordinates you provide, the better the result will be.
The first step is to start QGIS and load the Georeferencer Plugin (see Section sec:load_core_plugin) and click on the icon which appears in the QGIS toolbar menu. The Georeferencer Plugin dialog appears as shown in Figure 48.
For this example, we are using a topo sheet of South Dakota from SDGS. It can later be visualized together with the data from the GRASS spearfish60 location. You can download the topo sheet here: http://grass.osgeo.org/sampledata/spearfish_toposheet.tar.gz
Entering ground control points (GCPs)
- To start georeferencing an unreferenced raster, we must load it using the browse button. The raster will show up in the main working area of the dialog. Once the raster is loaded, we can start to enter reference points.
- Using the button, add points to the main working area and enter their coordinates (See Figure 49). For this procedure you have two options:
- Continue entering points. You should have at least 4 points, and the more coordinates you can provide, the better the result will be. There are additional tools on the plugin dialog to zoom and pan the working area in order to locate a relevant set of GCP points.
The points that are added to the map will be stored in a separate text file ([filename].points) which is stored together with the raster image. This allows us to reopen the Georeferencer plugin at a later date and add new points or delete existing ones to optimize the result. The points file contains values of the form: mapX, mapY, pixelX, pixelY. You can alsoand to different directories if you like.
Choosing the transformation
After you have added your GCPs to the raster image, you need to select the transformation type for the georeferencing process. Depending on how many ground control point you have captured, you may want to use different transformation algorithms. Choice of transformation algorithm is also dependent on the type and quality of input data and the amount of geometric distortion that you are willing to introduce to final result.
Currently, several algorithms are available:
- Polynomial 1
- Polynomial 2
- Polynomial 3
- Thin plate spline (TPS)
- The Linear algorithm is used to create a world-file, and is different from the other algorithms, as it does not actually transform the raster. This algorithm likely won't be sufficient if you are dealing with scanned material.
- The Helmert transformation performs simple scaling and rotation transformations.
- The Polynomial algorithms are among the most widely used algorithms for georeferencing, and each one differs by the degree of distortion introduced to match source and destination ground control points. The most widely used polynomial algorithm is the second order polynomial transformation, which allows some curvature. First order polynomial transformation (affine) preserves colliniarity and allows scaling, translation and rotation only.
- The Thin plate spline (TPS) algorithm is a more modern georeferencing method, which is able to introduce local deformations in the data. This algorithm is useful when very low quality originals are being georeferenced.
Running the transformation
- When the GCPs have been collected, and the transformation has been chosen, press either to create a new raster or to automatically add the new raster to the layer list.
- A warning message will appear that will inform you that a new raster (in GeoTIFF format) will be created.
- After hitting OK, you will also be asked to choose a resampling method. There are three methods available:
- Nearest neighbour
Tip 44 Choosing the resampling method
The type of resampling you choose will likely depending on your input data and the ultimate objective of the exercise. If you don't want to change statistics of the image, you might want to choose Nearest neighbour, whereas a Cubic resampling will likely provide a more smoothed result.