Georeferencing#
Georeferencing in QGIS is the process of aligning a raster image, such as a scanned map or aerial photograph, to a known coordinate system so that it can be used in spatial analysis. This involves assigning real-world coordinates to the image by identifying control points on the raster that correspond to known locations on the earth, often using existing vector layers or coordinate grids as a reference.
In many cases, governmental institutions publish maps only as PDFs, without public access to the underlying data. In
these cases, knowing how to correctly georeference a map allows you to access and use the information in your GIS
analyses. In the case below, the soil degradation map of Somalia is only available in a pdf report. In order to use the
information in a GIS analysis, we can use the georeferencer to assign geographic coordinates to the pixels of the
image. After georeferencing the image, the result is a raster file (.tiff
). This dataset can be vectorized
(converted into vector data) or joined with other raster data, to gain additional information.
Georeferencing is the process of giving each pixel on a map geographic coordinates. This is done by selecting points on a map, and assigning them a geographic coordinate, either by enter the coordinates manually, or selecting the corresponding point in the QGIS map canvas. These points serve as reference points for the georeferencing algorithm to add geographic coordinates to each pixel in the raster.
Georeferencing in QGIS#
In QGIS, the Georeferencer tool is used for this process. Users manually place control points on the raster image and match them to corresponding locations in a reference dataset. The software then uses these points to transform the image, adjusting its scale, rotation, and position to accurately overlay it with other geospatial layers. Georeferenced images become valuable for digitizing features and conducting spatial analyses within a GIS.
There are several transformation algorithms available in QGIS to gereference a map. If the map is in the same CRS and only needs to be rotated, a linear transformation is sufficient. However, if the image or map is in a different CRS or is visibly skewed, a polynomial transformation is needed. The more complex the transformation algorithm is, the more Ground Control points you need.
In most cases, you will use either linear, or polynomial (2nd or 3rd degree) transformations. There are many more transformation types to be used in QGIS. Each works best for a specific use case. For an explanation of each transformation type, check out the QGIS Documentation
How to Georeference in QGIS#
In order to georeference a PDF map, you need to follow the following steps:
The first step is to export the Map from the PDF as an image. For example, you can take a screenshot using the
Snipping Tool
on Windows, or by pressing Shift + Command + 4 on MacOS. Name and save the screenshot.In your QGIS window, add a basemap using the QuickMapServices Plugin. Ideally, use a basemap where you can identify exact locations on both the basemap and the map you want to georeference.
Open the Georeferencer by navigating to the Top Bar >
Layer
>Georeferencer
(see Fig. 73)
A new window will open. This is the georeferencer. To add an image to georeference, click on
Open Raster
.Select the image of the map you want to georeference. Click
Open
.The image will appear in the middle of the georeferencer window. Click on
Transformation settings...
.A new window will open. Here you can set the transformation type and the target CRS. Below, you can set the name and save location of the file. Make sure that the
Load in project when done
is checked.
Click on
Ok
.Once you have set the transformation type, you can start adding Ground Control Points (GCP) by clicking on
Add Point
. Ground Control Points are points that you ascribe specific geographic coordinates.Click on a point on the map image. This will be the precise location that you can identify on both the basemap and the map you wish you georeference.
Once you clicked on a position, a new window will appear. Here, you add the coordinates to the point you selected. There are two options to do this:
Enter the coordinates manually. You will need to know the exact coordinate. Sometimes, you have a coordinate grid on maps where you can
Select the points . This mode will minimize the georeferencer and open the QGIS Map canvas. Zoom to the same location you selected on the non-georeferenced map and Click once.
Once the coordinates are entered, click
Ok
The georeferencer window will open again. This time, below the map image, you can see a point in the table. These are the Ground Control Points. Continue adding more GCP. Spread them out over the entire map. Make sure that the
Mean error
in the bottom right corner of the georeferencer window is as low as possible (below 5 is ideal).
Once you have added enough points, click on
Start Georeferencing
. QGIS will use the Points you added to transform the image into a georeferenced image, where every pixel has GPS coordinates ascribed to it.You can close the georefencer window. Decide wether you want to save the GPC points in a file. If you are not sure if your georeferencing accuracy was precise enough, save the GPC points so you don’t have to do all the work again.
Congratulations, the georeferenced map will now appear as a raster layer in your QGIS-project