Chapter 3: Georeferencing in QGIS

Stream B: Georeferencing a Map of Georgetown from 1880

Downloads

We will acquire the 1880 map of Georgetown from the Island Imagined website. Island Imagined is part of the Island Archives network of websites, which are run in large part by the Island Archives Centre at the University of Prince Edward Island.

 

  • Click here to access the map on the Island Imagined website.
  • To download the highest resolution copy of the map, do not zoom in to the map using the “plus” button in the top-left, as shown in this screenshot:
Figure 3.5. This is a 1880 map of Georgetown in a preview window at the Island Imagined website.
Figure 3.5
  • Instead, leave the image zoomed out and click the scissors icon shown in the top right of the screenshot above.
  • A new page will load, where you can click Download Image. The image will download as a JPEG.
    • Note: Make sure to download your image to the Rasters subfolder that we created earlier.
Figure 3.6. The red underlined text Download Image shows where the 1880 map of Georgetown can be downloaded from the Island Imagined website.
Figure 3.6

 

Georeferencing

Preparing the GIS for Georeferencing

  • Make sure that you have the OpenStreetMap layer added to your QGIS project.
    • Also make sure that it is the only layer that is visible. You may have to uncheck any other layers.
  • Make sure your project’s coordinate reference system is set to EPSG:2954.

Preparing the Images for Georeferencing

To georeference in QGIS, we will use a tool called the Georeferencer.

  • Enter the Georeferencer tool. On Windows this tool can usually be accessed via the Raster menu.
Figure 3.7. This image shows the options that appear when the Raster button is selected at the top of a QGIS project. The Georeferencer button is highlighted as the 3rd option down.
Figure 3.7
  • On Mac versions of QGIS 3.22 and older, the Georeferencer tool is under Raster, but on some versions, including QGIS 3.23, the Georeferencer tool is found under the Layer menu.

This will open the Georeferencer window.

Figure 3.8. This is the Georeferencer window showing a bank white page.
Figure 3.8

Next, we will add the raster of the map we want to georeference.

  • Click this symbol to add the raster of Meacham’s map of Georgetown.

 

Figure 3.9. This is the Georeferencer window after the Georgetown 1880 map has been added to the white preview panel.
Figure 3.9
  • To return to the Main Canvas (where our OpenStreetMap is), click the minimize button on the Georeferencer window.

Preparing the Basemap for Georeferencing

  • Zoom in on the OpenStreetMaps layer to Georgetown, Prince Edward Island.
Figure 3.10. This shows the QGIS map zoomed into the OpenStreetMaps layer of Georgetown and Kent Street highlighted with a red line.
Figure 3.10

 

In the OpenStreetMaps map, Georgetown’s Kent Street is running almost vertically up and down our display. But, in the Meacham’s Atlas image, Kent Street is running horizontally.

Figure 3.11. This image is the 1880 Meacham’s Atlas image in the Georeferencer preview pane with Kent Street is running horizontally and highlighted with a red line on the image.
Figure 3.11

 

It will be easier to identify common elements between the two maps if we reorient the OpenStreetMaps map to match the orientation of the Meacham’s Atlas map. To do so:

  • Change the Rotation of the OpenStreetMaps map to 105.0°
Figure 3.12. This shows the OpenStreetMaps map with the rotation value changed to 105.0° as seen in the bottom right hand corner of the image with the red underline.
Figure 3.12

Adding Control Points

What Are Control Points?

Now that we have added the map to the Georeferencer tool, we will start adding control points. These control points are points on the historical map that exist on a modern map—in this case, the OpenStreetMaps layer.

Adding control points is the means by which users precisely align the raster map with the reference map. A “control point” is actually made up of two sub-points—one that users place on the raster map and one that they place on the reference map. When you place these two points, you are telling QGIS that these two points represent the same geographic location.

At the end of the georeferencing process, after you have placed your control points, QGIS will know how to align the historical image with the modern-day map. It will align the raster image so that the control sub-point you placed on it is positioned directly above the corresponding control sub-point you placed on the reference map.

QGIS’ Control Point Buttons

The following buttons on the toolbar  represent, from left to right,

  • Add Control Point
  • Delete Control Point
  • Move Control Point

Adding Control Points

Before we can add control points, we need to look at our map of Georgetown from 1880 and our OpenStreetMap of Georgetown.

  • Visually identify the geographic features that are clearly common between these two maps.

These features are often political borders and boundaries, buildings, street intersections, and bridges.

An urban map, the plan of Georgetown focuses on streets, buildings, and town blocks. While some of Georgetown’s features have changed between 1880 and today, its distinctive grid-pattern layout has remained largely unaltered. Considering this consistency in street layout between the 1880 and modern-day maps, it seems like using street intersections for control points would produce an accurate georeference.

Note: it would not be a good idea to use historical buildings as the sites of our control points. This map dates back to the 1880s, and it is unlikely that many of those buildings are still standing today. An excellent example of this is the King’s County Courthouse. It was built in 1887 and is not in the same place as the courthouse on the 1880 map. Using historical buildings as sites for our control points would require some research prior to georeferencing.

 

It seems that the intersection between West St. and George St. would be a good spot to place our first control point.

Figure 3.14. The 1880 Meachams Atlas view of Georgetown with a red dot indicating where West St. and George St. intersect in the upper right area of the image.
Figure 3.14
Figure 3.15. The modern OpenStreetMap view of Georgetown with a red dot indicating where West St. and George St. intersect in the upper right area of the image.
Figure 3.15

 

 

Now that we have identified a street intersection that aligns between the 1880 map and the OpenStreetMap,

  • In the Georeferencer window, click Add Control Point
    • Your cursor will now turn into crosshairs.
  • Click in the very middle of the intersection between West St. and George St. in the 1880 map.

 

Tip: There are many different strategies for choosing accurate control point locations in historical GIS. Like all historical research, it helps to use a variety of sources to test the accuracy of the information contained in your historical map. It is also useful to compare different historical maps from the past with features that exist in the real world in the present. In general, it is best to start with more recent maps and work backward. This is because more recent cartography is often more accurate, and because it is easier to identify features that have changed when working in reverse chronological order. All maps are different as well, and as we learned in previous chapters, scholars must consider the mapmaker’s original intent, the mapping conventions, and the scale at which the map was considered accurate.

 

With these principles of control point placement in mind, we must consider the conventions and intentions of the 1880 map. It was an urban map with a focus on street and building locations, and it was intended for use at the town or regional scale. In other words, it was not intended as a property map or as a tool to guide municipal surveyors or developers.

In this case, urban historians usually choose the middle of a street or intersection as the most accurate control point. This is in case there are markings on the historical map that were meant to indicate edge features (eg. sidewalks) that were very likely to change as road infrastructure changed over time.

Figure 3.16. A red plus sign is drawn in the middle of the road where West St. and George St. intersect in the upper right area of the Atlas image.
Figure 3.16

 

Note: always place the first control sub-point on the raster of the historical map.

 

Once you place the first control subpoint on the 1880 map, the “Enter Map Coordinates” window will pop up:

Figure 3.20. The “Enter Map Coordinates” window pop-up with coordinates now filled into the x/East and Y/North boxes.
Figure 3.17
  • Click “From Map Canvas”

 

Upon clicking this, the georeferencer window will minimize itself to the bottom-left of your screen underneath your table of contents. If you ever need to reopen the Georeferencer window, you can click its “maximize” button.

Figure 3.18. This shows the Layers Table of Contents panel on the left hand side of the main QGIS window and the OpenStreetMaps map canvas visible on the right.
Figure 3.18

 

In the main QGIS window,

  • Click in the very middle of the intersection between West St. and George St. in the OpenStreetMap.
Figure 3.19. A red plus sign is drawn in the middle of the road where West St. and George St. intersect in the upper right area of the OpenStreetMaps image.
Figure 3.19

After you click on the OpenStreetMap, the “Enter Map Coordinates” window will reappear within the Georeferencer. The X / East and Y / North coordinates will now be filled in.

 

Note: For some users, especially on Macs, the Georeferencer or Ener Map Coordinates windows may be maximized but obscured by another window. Try alt-tab (Windows) or cmd-tilde(~) (Mac) to toggle through your open windows.

 

Figure 3.20. The “Enter Map Coordinates” window pop-up with coordinates now filled into the x/East and Y/North boxes.
Figure 3.20
  • Click OK.

 

Once you have placed a control point, it will appear as a red dot on the historical map in the Georeferencer window and on the modern-day map in the main QGIS window.

Figure 3.21. In the Georeferencer window a red dot marks the control point where the red plus sign used to be located on the Atlas map.
Figure 3.21
Figure 3.22. In the Georeferencer window a red dot marks the control point where the red plus sign used to be located on the OpenStreetMaps map.
Figure 3.22

 

If you happen to make a mistake while adding a control point, you can delete it.

  • In the Georeferencer window, click Delete Point
  • Your cursor will turn into crosshairs. Click on the red control point you wish to delete, and it will be deleted.

At the bottom of the Georeferencer window, there is a “GCP Table,” which lists the control points that you have added. As an alternate way of deleting a control point, you can right-click a control point in this table and click “Remove.”

Figure 3.24. This image shows the Georeferencer window, where there is a “GCP Table,” with information about the single control point created in the top row.
Figure 3.24

 

You can now repeat the steps in the “Adding Control Points” section until your raster is completely georeferenced. Generally speaking, in order to completely georeference a raster of a historical map, one will usually add a minimum of four and a maximum of ten control points.

It is helpful to spread out your control points across the map, and it is usually best to try to place one control point in each of the corners of the image.

Four control points—especially if placed in the four corners of the historical map—can quickly orient the raster into the correct position in relation to the reference map. Although you may place more than ten control points, after you have placed ten, any further points you place will have an increasingly diminished effect on the orientation of the historical map in relation to the reference map. This Georgetown map from 1880 can be georeferenced fairly accurately with four control points, one on each of its four corners:

Figure 3.25. This shows the Atlas map with four control points added to it, each marked by a red dot in the middle of a street.
Figure 3.25
Figure 3.26. This shows the OpenStreetMaps map with four control points added to it, each marked by a red dot in the middle of a street.
Figure 3.26

If, during the process of adding control points, your work goes totally askew, you can erase all of your control points, remove the raster, and restart. To do so,

  • In the Georeferencer window, click File and then Reset Georeferencer
Figure 3.27. This shows that in the Georeferencer window, under File a Reset Georeferencer option is the first option available.
Figure 3.27

 

Saving Control Points

Before continuing, we can save our control points to a .points file for future use. This can be helpful if we need to re-georeference the same map and we wish to reload our control points. Or we can use these control points again in a different future project.

 

To save your control points,

  • Click Save GCP Points
  • Save your control points in the ControlPoints subfolder within the Chapter3 folder. Name the control points file “GeorgetownControlPoints”

If you ever wish to load control points,

  • Click Load GCP Points

Transformation Settings

Before we can complete the georeferencing process, we need to select a Transformation type.

 

Caution: make sure to have saved your control points before selecting any transformation options. QGIS has been known to crash while attempting repeated transformations in a short amount of time, in which case you may lose any unsaved control points.

 

Transformation is the equation by which QGIS “transforms” the raster to its real map coordinates. Every time you georeference a raster, it goes through a transformation to reach its real-world coordinates. Transformation settings determine how QGIS interprets your control points while georeferencing your raster. The Transformation process affects the scale, rotation, and precision of the map data.

The transformation settings can be viewed and set by clicking the Transformation Settings button in the Georeferencer window:

Figure 3.31. Transformation Settings dialogue window.
Figure 3.31

We need to specify a Transformation Type, Resampling Method, Target SRS, and Compression. We also need to provide an Output Raster name.

Transformation Types

There are several types of transformations that QGIS uses to place the raster dataset accurately onto its reference map. Listed as least to most complex, these types are Linear, Helmert, three types of Polynomial, Thin Plate Spline, and Projective. Generally, the more complex a transformation type, the more control points that are required.

The Linear transformation type is the simplest. It does not alter the raster. Helmert will alter the raster by altering its position on the X/Y/Z axes, altering its scale, and altering is rotation.

 

Note: a large-scale map is zoomed in and shows a lot of detail for a small area. A small-scale map is zoomed out and shows little detail for a large area.

 

The Polynomial transformations are some of the most commonly used transformations among GIS users. They can warp the raster, which can be key when georeferencing scanned images of old maps that do not always align exactly with the base map. Among the three polynomial transformation options, Polynomial 1 will change the raster the least. Polynomial 1 will keep lines on the raster straight, but it will change the angles between them. It will also adjust the scale and rotation of your raster. Polynomial 2 and Polynomial 3 are used when you need to alter your raster more drastically. Polynomial 2 will begin to bend straight lines, and Polynomial 3 bends them to a greater extent.

Thin Plate Spline is a rather complex transformation. It allows for local areas of an image to have their own independent warping. For example, one part of an image might rotate one direction, while another part of the image might rotate in an entirely different direction. Because they have their own warping, these local areas will be very accurate at the expense of global accuracy.

The Projective transformation is useful when georeferencing scanned maps, especially if you are concerned with having accurate local data. The Projective transformation can warp lines to make them straight.

For a more detailed explanation of QGIS’ various transformation types, please see Chapter 7: Advanced Georeferencing and Digitization.

Choosing a Transformation Type

We are working with Georgetown, a town built in a square grid. We may not wish to distort these straight lines, so it seems that the Projective transformation option is perhaps the best fit for our project. This transformation type requires four control points, and we have placed four.

  • Click Projective in the Transformation Type dropdown menu.

Resampling Method

Resampling is the process of taking an amount of data as a sample and calculating the precision of the data, based on the sample. Smoothing data refers to removing irregularities, such as small sudden spikes, based on the sample.

 

The following options are available in QGIS for resampling:

  • Nearest Neighbour
  • Linear
  • Cubic
  • Cubic Spline
  • Lanczos

 

If you select Nearest Neighbour, few changes will be made to your raster. However, the Lanczos option makes the most changes to your raster to smooth it out as much as possible. Each resampling method between Nearest Neighbour and Lanczos delivers a progressively smoother result.

It does not seem that our project requires a great deal of smoothing out. So, Nearest Neighbour seems to be a good fit.

  • Select Nearest Neighbour from the Resampling Method dropdown menu.
Target SRS

The Target SRS should match your Project CRS. If you will recall, our Project CRS is 2954.

  • Select EPSG: 2954 from the Target SRS dropdown menu.

Output Raster

Here is where we can choose where we would like to save our georeferenced raster. The default location that QGIS gives is the same location where the original raster was stored. However, we would like to save our georeferenced rasters to the Rectified subfolder within the Chapter3 folder.

  • Click Browse.
Figure 3.32. This shows the Output settings with the output raster where the “...” or ellipses option is being highlighted with a red underline.
Figure 3.32
  • Navigate to the Rectified subfolder within the Chapter3 folder and click Save.
Figure 3.33. This shows the Rectified subfolder within the Chapter3 folder. The File name box contains “Georgetown_modified,” the Save as Type box says “TIF files,” and the save button has a highlighted blue border around it.
Figure 3.33

QGIS automatically appends “_modified” to the existing raster file’s name.

Compression

Compression is heavily dependent on hardware and processing power. The purpose of compression is to make the output file smaller. If a compressed file is “lossless,” the compression process has not degraded its quality. By contrast, if a compressed file is “lossy,” the compression process has degraded the file’s quality in order to significantly reduce the file’s size.

The following compression options are available in QGIS:

  1. LZW (Lempel-Ziv-Welch) is a lossless compression algorithm commonly used for GIFs and TIF files.
  2. PACKBITS is a fast and simple lossless compression algorithm.
  3. DEFLATE is a lossless data compression algorithm commonly used in archives.

 

It seems that LZW will do the trick.

  • Select LZW from the Compression dropdown menu.

 

Load in QGIS When Done

Before clicking OK in the Transformation Settings window, we can select “Load in QGIS when done.” When we click this, QGIS will automatically load the georeferenced raster into our project without us having to click Layer and then Add Layer from the top menu in QGIS.

  • Check the box in the Transformation Settings window that is called “Load in QGIS when done.”

When all of your settings reflect the ones selected in the following screenshot, you can click OK to close the Transformation Settings window:

Figure 3.34. This shows the Transformation Settings window with the option “Load in QGIS when done” checked.
Figure 3.34

 

 

 

Completing the Georeferencing Process

Once we have configured our transformation settings, we can complete the georeferencing process. To do so,

  • Click the Start Georeference Button

 

This will open a small Progress Bar that will represent the progress of your georeferencing process. Once it has reached 100%, you will have your georeferenced raster added to your Project and saved in your Rectified folder.

Figure 3.36. This is the Progress Indication bar that shows the percentage of the georeferenced raster process that will be added to your Project.
Figure 3.36

 

Once the georeference is complete, you will receive this message:

Figure 3.37. This is the informational message that pops up in the QGIS project window to state when the raster has been added.
Figure 3.37

 

You can now close the Georeferencer window. Your map has been georeferenced.

Checking the Accuracy of the Georeferenced Map

As we did with the 1991 NTS map of Georgetown, we can adjust the transparency of the 1880 map of Georgetown in order to see how well it aligns with the base map.

 

  • Right-click the 1880 Georgetown map in the table of contents.
  • Click Properties
  • Click Transparency
  • Change the Global Opacity to 50%.
  • Click OK.
Figure 3.38. This is the 1880 Georgetown_modified Layer Properties dialogue with the Global Opacity slider value changed to 50%.
Figure 3.38
  • Zoom into the Georgetown area.
  • Compare the streets in the 1880 Georgetown map with those in the underlying OpenStreetMaps base map. How well do they align?

As we can see in the screenshot below, the 1880 map of Georgetown and the OpenStreetMaps layer align very well. Almost all of the streets, including Kent Street and Richmond Street, align almost exactly. We can now be confident that our georeferencing is accurate.

Figure 3.39. This shows the 1880 map of Georgetown and the OpenStreetMaps layer aligned and partly visible as semi-transparent overlays.
Figure 3.39

 

License

The Geospatial Humanities Copyright © by Joshua MacFadyen; Benjamin Hoy; and Jim Clifford. All Rights Reserved.

Share This Book