This is a very simple step by step guide created by a beginner using QGIS for a beginner using QGIS. It will help you to plot a species distribution exported from the Specify database into an Excel file onto a simple map of New Zealand with some bathymetry lines.
First you will need to find a vector layer for your map.
A useful NZ and outlying islands inside the EEZ outline can be found here:
You will need to register to download the data layers but it is free and very quick to do.
Open QGIS new project and set your default Coordinate Reference System for this project
Click on Project in top menu bar
Click on Project Properties
Search for WGS 84 / Mercator 41 EPSG:3994
Enable ‘on the fly’ CRS by ensuring the box is checked.
3. Add a new vector layer
- Click on Layer>Add Layer>Add Vector Layer
- Browse to folder of layers that you downloaded from linz and select the .shp file
- Click on Layer>Add Layer>Add Vector Layer
This plots the outline of New Zealand and the outlying islands:
4. Now to add some bathymetry to our map:
You can download bathymetry layers from the NIWA website:
A useful one for a background map is the New Zealand region 250m gridded bathymetric data set and imagery, CANZ (2008). You can download this as an ESRI shapefile (.shp)
For a wider and more colourful bathymetry the Southwest Pacific Region bathymetry is great and you can download that as a GeoTIFF.
- Click on Layer>Add Layer> Add Vector layer
- Browse to the .shp file containing the bathymetry that you downloaded from NIWA
- It should plot onto the map:
5. Now to plot simple data onto the map:
Open your excel file and delete out any fields that contain commas (i.e. a comments field).
Save Excel file as .csv (comma delimited text file)
In your QGIS project make sure your coastline and bathymetry layers are plotted ok
Click on Layer>Add Layer> Add delimited text layer
- Browse to your .csv file and select it
- In the window that pops up click csv for your file format and it should recognise your simple file
- Note for this example my latitude and longitude were already in decimal degrees format (ask Brent if you want to try and convert Degrees, decimal minutes format. Do this in excel first! Otherwise for degrees minutes seconds format tick the box DMS coordinates)
- QGIS should also automatically recognise which are the columns with your latitude and longitude (if not, then type in the column header for the data you want to plot).
- Click ok – any problems with the data QGIS will tell you
- In the next pop up box you may need to choose Coordinate Reference System: WSG 84 EPSG:4326 for this layer
Now your points should plot onto the map nicely:
This example is all records of Ophiuroidea species in the NIWA Invertebrate Collection Specify database
So what if we want to only plot a subset of the data?
6. As an example I want to only show records of a single species, Ophionereis fasciata
- In the layer panel on the left hand side, right mouse click the data layer and select properties
- In the general layer properties pop up box scroll down and click on Query Builder
- In the Query Builder box double click on the Field name that contains the species you want to plot. In this case it is “Full_taxon_name”
- Click on All in the values box to bring up a list of all of the values contained in that column of your data
- Select = in the Operators panel
- Scroll to and select the species and genus taxon name in the values box or type in the species name in single quotation marks
- Click test to check how many rows of data this will display
- Then click ok
- Click ok to close the query builder
- Click apply and ok to close the properties box
The data plotted is now only the species Ophionereis fasciata:
I also changed the colour of the islands to green and the points to red:
- Right-click on each layer and click on Properties menu
- Click on the style tab and select the colour and symbol for your marker
7. This is rather a lot of bathymetry so to plot only a few bathymetry lines on the map, for example 50 m, 100 m and 500 m:
- Right-click on bathymetry layer, select Properties, click on the Query builder
- Double-click on “DEPTH” and the = button
- Click to show All layers
- Double-click on the depth contour you want to plot on the map
- Click OR, then select the next depth etc…
- Click test, Ok, apply and OK
Zooming into the map near Wellington looks like this:
And my final map with just a single species, just a few bathymetry lines, and some nicer colours for the land and data points looks like this: