DEV Community

Cover image for How to georeference a map with QGIS
Noan
Noan

Posted on

How to georeference a map with QGIS

This tutorial is for you if you have a map you obtained from some website or some book, you need to produce a .tiff file which is a localised version of your a mapping. E.g. to display it in a mapping system such as leaflet but you do not know how to do it. You mya have read notes about projection systems, but the calculous got complicated and you may not even know what projection system your map is using.
QGIS can help you to geo reference a map even without knowing the projection system.

Geo-reference the image

Once you have installed QGIS:

  1. Open the GeoReferencer tool

Cursor clicking on Layer > Georeferencer

  1. Load your image

Cursor clicking on open raster

  1. Click on add a point

Cursor clicking on add a point

  1. Find a point of your map from which you can deduce the coordinate, e.g. a building, a place, a confluence of 2 rivers, a specific point on a coast. You can find its coordinates on OpenStreetMap. Fill in the coordinates (X = longitude, Y = latitude).

Window to add map coordinates

  1. Find another point and repeat step 4 at least once, the more location you fill, the more precise the georeferencing.
  2. Click on Transformation Settings.

Cursor clicking on transformation settings

  1. In transformation type, choose Linear projection which is the simplest geo referencing algorithm and is relevant if your map is not distorted. This algorithm may produce unexpected result if your image is distorted (e.g. if it's a picture of a book the page may be curved on the corners). To optimize the result you can find out about other algorithms to find the most appropriate to your map.
  2. Click Run, QGIS will produce a .tiff file in the same folder as your input image. Which is your geo referenced map.

(Optional) Verify your geo-referencing with OpenStreetMap

After you have runned the geo-referencing process QGIS should open the .tiff file. You may want to open it over a map to make sure the geographic elements of the maps stand at the right coordinates.
In order to create the OpenStreetMap layer in QGIS you can

  1. Add an XYZ layer Cursor clicking on add XYZ layer
  2. Choose OpenStreetMap as the source, add it

add an XYZ layer window

  1. Make sure to move your image layer on top of the OSM layer to view it Cursor clicking on Move to top
  2. Right-click on the image layer and in the layer properties choose an opacity lower than 100% to see both your image and OpenStreetMap Image layer transparency window
  3. You may now compare your image geo referenced with the real map View of Paris map over the OpenStreetMap layer

Top comments (0)