Thursday, 9 August 2012

QGIS: Free Dots on Maps

This is a quick rough and ready tutorial aimed at giving a recorder with little or no GIS experience a simple method for creating a basic species distribution map in QGIS like this one:

 © Cumbria Biodiversity Data Centre. Contains Ordnance Survey data © Crown copyright and database right 2011



You will need
  • A list of grid references where the species is known to occur
  • A base map you have been given as a georeferenced picture by someone such as your friendly Local Records Centre - this will be two files e.g. basemap.tif and basemap.tfw.
  • To have downloaded and installed Quantum GIS ("QGIS") - free download
  • Microsoft Excel (or an alternative way to get Eastings and Northings)

Step 1 - Format the grid references

If you just want a go at making a map, skip this step and download and save this sample file on your computer: Cliorismia_rustica.txt.

This step requires Microsoft Excel, otherwise you will need to calculate the Eastings and Northings using an alternative method.
  1. Blur your list of grid references to a resolution that makes sense for the map you are trying to create - usually you would use monad (1km); tetrad (2km); or  hectad (10km). To do this use the excel template and instructions in my blog post.
  2. Optionally if you have a lot of duplicates in your list of blurred grid references, e.g. NY4959 appears several times, you can use the advanced filter in Excel to get rid of the duplicates. Otherwise just leave them as I have in the sample file, they don't matter.
  3. Calculate the Eastings and Northings for the centre of the blurred grid references using the excel template and instructions in my blog post. You'll need to copy and "paste values" when using the template.
  4. Copy and paste the values of the Eastings and Northings and Grid Reference into a new Excel workbook and give the columns appropriate headings. Then save as a text (tab delimited) file species.txt.

Step 2 - Create the Map


You will need to have saved both the basemap.tif and basemap.tfw files you have been given in the same folder.

For Cumbria you are welcome to use these CBDC maps but should you use them in a publication please acknowledge them and the OS data they contain with "© Cumbria Biodiversity Data Centre. Contains Ordnance Survey data © Crown copyright and database right 2011."
Colour version (18Mb download)
cumbria_basemap.tif
cumbria_basemap.tfw

Black and white version (6Mb download)
cumbria_basemap_bw.tif
cumbria_basemap_bw.tfw
  1. Open Q-GIS
  2. Layer → Add Raster Layer. Navigate to where you saved the basemap files and select the tiff file e.g. cumbria_basemap.tif.
  3. Layer Add Delimited Text Layer. Browse to the species.txt file you created in Step 1 (or where you saved Cliorismia_rustica.txt example file). Select Tab as the delimiter and the easting field as the X field and the northing as the Y field. Click OK.


  4. You will be asked to select the "coordinate reference system". In search type "OSGB", change the "search for" drop down from ID to "Name" and click on Find. Select OSGB 1936 / British National Grid and click OK.
  5. To ensure the dots don't overlap, we should specify the size. Right click on the species name in the list of layers and select properties. In the menu that opens, in the "Unit" drop down select "Map unit". As we are using the British National Grid our map is in units of 1 metre. In the example Cliorismia_rustica file, we had a list of 1km squares, so type 1000 in the size box (2000 if you are working in tetrads etc.) and click OK.


  6.  File Save as Image (I usually recommend png format). That's it!
  7. You can zoom in using the magnifying glass to a particular part of the map. Whatever you can see on screen is what you will save as an image.


Cliorismia rustica in the Eden catchment. © Cumbria Biodiversity Data Centre. Contains Ordnance Survey data © Crown copyright and database right 2011

If your appetite has been whetted for exploring Q-GIS further, there are lots of resources on the web such as this QGIS beginners manual. Alternatively, you could use dedicated biological recording software created for this purpose such as DMAP.

© Stephen Hewitt
Thank you to Stephen Hewitt for the Cliorismia rustica data. You can learn more about this BAP species, the southern silver stiletto fly, here.

No comments:

Post a Comment