## The idea behind georectification

Georectification is the process of taking an image of a map and referencing it to a spatial grid, so that the image of the map can be used as a layer in other maps, or so that the image of the map can in turn be used for associating points of interest with the spatial grid. For instance, one might georectify a map of a city, then use that georectified map to find the latitudes and longitudes of buildings on the map.

To georectify a map, one identifies points on the image of the map which correspond to points in a coordinate reference system (a CRS, see the section on working with spatial data). In other word, one matches up points between a historical map and a contemporary way of keeping track of spatial data. An algorithm interpolates between those points to warp the map so that all parts of it line up to the grid.

As an example, consider the map below. The base layer is a contemporary street map from Open Street Map. But on top of that base is George Boynton’s A new & complete map of the city of Boston, and precincts including part of Charlestown, Cambridge & Roxbury (1850). By layering the historical map on top of the contemporary map one is able to see how Boston changed over time. (See half a dozen georectified historical maps of Boston.)

One can get a better sense of how georectification works by looking at Ben Schmidt’s georectified maps of Boston’s MBTA, New York’s MTA, and the Washington DC Metro.

## Georectification with Map Warper

Many different tools can create georectified maps. For a classroom assignment, however, the online Map Warper works well, since it does not require students to install any software. (There is also another free version of Map Warper available from Harvard’s World Map.)1

1. Begin by going to the Map Warper website and creating an account, then login.

2. Find an image of map to georectify. See the resources page for a list of sites that have map images. The map should be the highest resolution possible. For the purposes of this tutorial, I am going to use the map of Canterbury Cathedral and its surroundings below.

1. Next click “rectify map.” Map Warper will provide you with an interface where you can pan and zoom an image of your map next to a map of the world. You should navigate to the area on the world map depicted in your map image, in this case, Canterbury in southeast England.
1. Add control points to the map. You do this by clicking on a point on the map image, then clicking on the same point in the world map, then clicking “add control point.” You will need a minimum of three to rectify the map. At least a dozen is better, and the points should be spread around the map. As you add control points they will be listed below the maps.
1. When you think you have enough control points, click “warp map.” You can always go back and add more control points later. You will be taken to a preview of your georectified map.

If you are not pleased with the results, then try “[Abby] Mullen’s Three Rules for Georectification”:

1. Use more points.
2. Use farther apart points.
3. Use more corners.

The Map Warper export tab offers many ways to use your newly rectified map. You can get a URL which can provide map tiles in either the WMS or Google Maps / Open Street Map formats. For instance, the map below was created using this tile URL from Map Warper: http://mapwarper.net/maps/tile/9592/{z}/{x}/{y}.png.

You can download the map as a georectified TIFF or georectified PNG, which can be opened in QGIS or other GIS software. You can also download a KML file, which can be opened in Google Earth.

## Next steps

Now that you have georectified our example map, can you find a map that would be worthwhile for your students to georectify? What use might they have for a georectified map? What could they accomplish if each student georectified a different map related to your course?

### Georectification in QGIS

It is possible to georectify a map in QGIS. Sometimes this is more convenient when you wish to compare a map image to be rectified to a vector layer rather than to map tiles as in map warper. You can also georectify a map in QGIS without any comparison layer if you know the latitudes and longitudes of points on the maps. For instance, you might have a topographical map which contains latitude and longitude information directly on the map. In the first case, you may find this tutorial from Abby Mullen helpful. In the second case, consult this tutorial on georectifying a map in QGIS. It is also possible to add a layer such as the Open Street Map or Google Maps to QGIS using the Open Layers Plugin, but in that case you are probably better off using Map Warper.

### Adding a georeferenced map as a layer in QGIS

After downloading a georectified TIFF or PNG from Map Warper, you can add it as a layer to QGIS. The TIFF or PNG is a raster image, so you can click “Layer > Add Layer > Add Raster Layer” in QGIS then load the file.

### Creating tiles from a referenced map

Throughout the workshop we have used have used tiled maps on the model of Google Maps or the Open Street Map. These maps work by requesting a set of tiles for the desired latitude, longitude, and zoom level. These tiles are usually returned as 256 pixel by 256 pixel images. You can see an example of a single tile of the 1850 Boynton map below, along with a screenshot of the georectified Boynton map where there are borders around the tiles. The mapping software then puts these tiles together to form the map. For a fuller explanation, see this post from MapBox.

Such tiles are typically requested from a URL by filling in the {x}, {y}, and {z} variables to get the desired tiles. For instance, Open Street Map tiles can be requested at URLs with the following format:

http://a.tile.openstreetmap.org/{z}/{x}/{y}.png

And the Boynton map above can be requested via URLs with this format:

https://s3.amazonaws.com/hist144a/tiles/boynton-1850/{z}/{x}/{y}.png

And the Canterbury map which I georectified is being served by Map Warper at the following URLs:

http://mapwarper.net/maps/tile/9592/{z}/{x}/{y}.png

Sometimes web servers run complicated software, such as GeoServer in order to serve these map tiles. But they can also be served as simple images by any web server if you pre-generate the tiles. If you have installed GDAL/OGR, then you can do this with the gdal2tiles.py utility. For example, if you download the georectified TIFF of the Canterbury map, you can convert it to tiles with the following command:

gdal2tiles.py 9592.tif

The result will be a directory with tiled images. These can be uploaded to any web server and served in the same {z}/{x}/{y} format as the examples above.

1. Though the David Rumsey Map Collection is an excellent source for maps to be georectified, I strongly encourage you not to use the georectifier available through that site, since it is very buggy.