QGIS Workshop on 1th July, Maynooth

Due to high demand, the All-Island Research Observatory (AIRO) will be holding an another ‘Data for Decisions’ GIS Workshop this summer at NUI Maynooth, before planned autumn workshops.

“The ‘Data for Decisions’ GIS Workshop is aimed at planners, policy and decision makers, local partnerships and local authorities researchers and private consultants who are interested in bringing data to the core of their decisions. The workshop is designed around the free and open source Quantum GIS (QGIS) software package and is pitched at those with minimum or no GIS experience.”

The day long workshop will introduce beginners to QGIS, with an emphasis on manipulating and analysing ‘socio-demographic’ datasets using the free and opensource software. The workshop is accredited by the Irish Planing Institute and members will gain 7 IPI CPD credits. More information can be found on the AIRO website:

AIRO ‘Data for Decisions’ – Intro to GIS Workshop 1st of July 2014

How to Georeference a map in QGIS

I was recently asked how to Georeference a map in QGIS, this a common and important task. Raster scans of paper maps and some satellite images are in pixel coordinates, they lack location information (no Longitude and Latitude values). In this case, QGIS will assume a single pixel is 1 metre square and it will place the Scanned map at 0o North, 0o West in the Atlantic Ocean south of Ghana. Not cool.

To prevent this we need to Georeference the map, change pixels coordinates into corresponding geographical values. This is done by clicking a visible landmark on the Scanned map and the exact same landmark on a corresponding georeferenced map, the GIS will attach geographical values to the Scanned map (see this interesting article about artificial landmarks used to Calibrate drones and satellites).

Georeferencing maps in QGIS is straightforward using the excellent OpenLayers Plugin. It allows you to add Google, Bing, OpenStreetMap and aerial photos to QGIS. We can take the geographical values from these maps and add them to our Scanned map. Here’s a step by step guide to achieve this:

1. Go to Plugins Menu – Manage and Install Plugins – Type OpenLayers Plugin – Install Plugin (you might have this plugin already).

2. Go to Plugins Menu again – Go to OpenLayers Plugin – Select “Add Google Physical Layer, Google Satellite Layer or Bing Aerial Layer etc.”… add whatever you like to the QGIS map canvas.

3. Move the map with the Hand tool, use the Magnifying Glass and/or the mouse wheel to Zoom to the same area as your Scanned map.

4. Go to Project Menu – Project Properties – Click CRS – Check the box “Enable ‘on the fly’ CRS transformation – type 3857 into the Filter box – Click WGS 84 / Pseudo Mercator – and hit OK.

5. Go to Raster – Georeferencer – Click “open raster” on the far left (left of the green triangle) – open your scanned map in the Georeferencer window.

6. The next stage is a bit tricky – you will need to find landmarks on your Scanned map that precisely coincide with locations on the Google / Bing / Street / Satellite Map in QGIS.

Tip – You might like to place QGIS and the Georeferencer Window side by side, so you can see e.g. the Scanned map next to a Google or Bing map. Good landmarks include bends in rivers, river confluence, road intersections, the corners of large buildings, rock outcrops, field boundaries and corners and small islands. Don’t click the tops of tall buildings, antennae or trees – locations are measured at ground / street level.

7. Zoom into your Scanned map in the Georeferencer window and the same are in the QGIS window – click a landmark in the Georeference window (using the yellow add point) – a dialogue pops up asking you to enter the coordinates – since you don’t know this value – you then choose click “from map canvas” – the Georeference Widow disappears – Now click the exact same landmark in the QGIS window using the cross hair – the map coordinates are added to the Scanned map the Georeferencer window.

Tip – it’s important to be as accurate as possible, so the final Georeferenced map will coincide with Google, Bing etc. These maps appear to be accurate to a few metres, I measuerd this using GPS. If you need better accuracy, you will need professional survey data and ground control points (bench marks).

8. Super Important – after adding all your Control Points – Save Them – if anything goes wrong you wont have to start from the beginning.

9. After adding about 8 to 12 points, which you are satisfied are in the same place on the Scanned map and the Google / Bing map in QGIS – hit the Green Triangle – the Transformation Settings dialogue will appear

10. Select Transformation Type – the selections available at the top of the drop down menu are e.g. Linear, Helmert – While faster they may give less accurate results – I usually choose Polynomial 2, 3 or thin plate spline – For Sampling – Choose Lanczos (smoother better results) – Choose the path of output Raster (where to save the georeferenced map) – The georeferenced map will be saved as a GeoTiff

11 – You must use the same CRS as the map canvas (see step 4).  Check Target CRS – type 3857 – add WGS 84 / Pseudo Mercator (if you later need to change the CRS of a Raster it is necessary to use the Raster – Reprojection – Warp command).

12. Click the box “Load in QGIS when done” – then Finally click OK!!!

13. Your computer may take a few minutes – it will generate and save a Georeferenced Geotiff and add it to the Map Canvas.

14. If all goes well, the nice Georeferenced Map will appear in the QGIS Window and it will be perfectly aligned above the Google / Bing map OpenStreetMap below.

15. If there are any errors – the map will usually look seriously distorted – common errors involve mixing up a control point.

16. Don’t worry, mixing up a control point is a common mistake – if one of your control points is wrong – find that point and delete it – go to step 7 and repeat for that point (hopefully it’s just one point).

Congratulations that’s it!

Here’s a video demonstrating Georeferencing in QGIS:

Multithreaded Map Rendering in QGIS 2.4

The next release of QGIS will have multithreaded map rendering, a feature initially added to QGIS Enterprise in late 2013, a customised version of QGIS provided by the Swiss consultancy firm Sourcepole. The code providing multithreaded rendering is now part of the unstable development branch of QGIS, which is now undergoing testing. So what is multithreaded map rendering and does it mean for QGIS?

All modern desktop computers have multicore CPUs, with 4 to 8 processing cores on a single CPU die. In theory, multicore CPUs allow computer code to run in parallel on each processor core resulting in a considerable speed advantage. However, standard computer code does not take advantage of extra processing cores, so called single-threaded code uses one core at a time.

This is because multithreaded computer code has to be explicitly written and compiled in order to take full advantage of modern multicore CPUs. This is no easy task and multithreaded applications remain comparatively rare, generally limited to multimedia, games and computer graphics applications that require CPU intensive calculations.

Computer scientist Martin Dobias, who is adding multithreaded rendering to QGIS explained in a recent interview that the development version of QGIS was initially quite unstable, it often slowed down or even crashed because more than one processor core attempted to access the same data at the same time. In order for multithreaded rendering to work it was necessary to get the CPU cores to work cooperatively rather than competitively.

The current version of QGIS, 2.2 Valmiera, is single threaded. It uses one CPU core when redrawing the map window or when a menus are selected, it cannot multitask within its own application. This typically causes QGIS to become unresponsive while a map redraws when one zooms or pans. This is especially true for large data sets.

However, as seen in the demo video below, the development branch of QGIS 2.3 now has stable multithreaded map rendering. There is a considerable increase in map rendering speed but also significantly, the interface of QGIS remains fully responsive. Furthermore, the already impressive responsiveness will grow proportionate the number of CPUs and cores provided. Imagine QGIS 2.4 running on a modern dual CPU Xeon workstation, with up to 24 CPU cores and 48 processor threads. This is just a taste of what to expect in QGIS 2.4 which is due for release on the 20th of June.

QGIS 2.3 Multithread rendering from Oslandia on Vimeo.

Note: This article was edited to include the recent interview of Martin Dobias by Tim Sutton.