14
apr
2011
Easiest and free way to georeference an image file
Some time ago I was confronted with the following problem: I was given a historic map of a certain city in jpg format, and I was requested to make it available to MapServer in order to be displayed along with the already available shapes and ecw raster imagery. I had no idea about how to proceed... but in the end it worked. Here is how.
There are lots of tools which allow to make this kind of job, but unfortunately most of them are beautiful but not free, or are so unintuitive that it becomes almost impossible to use them.After some research, I was able to find Quantum GIS, an open source GIS software available for Windows, Linux and Mac. On Windows, I downloaded the all in one installer and run it.
Georeferencing an image in QGis is a very simple task. Here is how:- Run QGis and create a new, blank project. You don't need to save it.
- You should already have some other georeferenced material, the best is aerial photos, but also shapes could do. Open the folder where those files are, and drop them onto the blank project. QGis will load and show them.
- In the QGis window, click on Plugins - Georeferencer - Georeferencer. The georeferencing tool will start up and show a window.
- Click on File - Open raster, and browse to the image file, in my case a jpg file. The plugin loads the file on its window.
- Click on the Add point tool from the toolbar (it's the icon with three red dots), then click on a known point on the map. It needs to be a point you can recognize on your other map, like the edge of a house, or a special natural feature, etc.
- A popup appears, asking you to input the coordinates. Click on the "From map" button. The popup temporarily closes, and you are reverted to the original map. Navigate with the keyboard and mouse wheel and locate the point on the map corresponding to the point you clicked on in the previous point. Click there, and you are returned to the popup window. A red dot is placed on the point you have just georeferenced.
- You repeat points 5 and 6 on several different points. You should choose points on different areas on the map, and not close together. The further away, the better. At least three are necessary.
- Once you finished, click on File - Start Georeferencing. A popup appears. You should fill at least the "Output raster" file. It will generate a geofererenced tiff file. You can also play with the "Transformation type" box. For me, for example, the Helmert transform worked best.
- Click on OK and the plugin will process your file. Now you should close the window (you can save your points in a separate file, in case you need to repeat the process later, which I recommend doing).
- Finally, you should check your map. A quick and easy way is to use the main window, which already contains your reference map. Now, drag the tiff file you generated on the main window: the map will be added. Double click on its layed on the left pane, and move the Global Transparency slider to somewhere aroud 50%. Now you can compare the original map and the new one, to see if it matches. If is does not, you can go back to the previous points and adjust some parameters.







