QGIS mapping styles for UK habitats

Hanbook for Phase 1 habitat survey coverLast updated 17th December 2015 to incorporate Phase 1 style files from James Watkins at Oxford Brookes. (Link at foot of page.)

A common requirement for ecologists using GIS is the ability to style habitat polygons to common standards (such as they exist). Phase 1 habitat mapping is still widely practised in the UK and is an unusual classification in that mapping styles were published along with the original classification. The phase 1 manual, with the specification of these styles, can be downloaded from the JNCC website.

The original Phase 1 classification was published in gentler times when questions of styling concerned themselves with issues such as which brand of pencils to use. Nowadays with GIS, for better of for worse, we are compelled to discuss RGB values and 'style files' instead.

Example of styles from the Phase 1 manualMany ecologists from the 'old' days would probably agree that a hand-coloured Phase 1 map is a thing of beauty and that the GIS equivalent doesn't come close. They may be right - producing an aesthetically pleasing habitat map using GIS is not as easy as you might think. Rendering styles varies considerably from one GIS system to another and reproducing styles such as those used in the original Phase 1 classification can be very difficult.

Nevertheless there have been several attempts to come up with Phase 1 styles for GIS that reflect, to some extent, the original schema whilst being, at the same time, practical for application by a dumb machine. I've had a look on the Internet to see what, if anything, was available for QGIS and I found a few useful resources which I am sharing here.

I found two QGIS style files (QML files) on Github which may be useful for those looking for something to style Phase 1 maps in QGIS. (You can download a copy of all QML files described in this article from a link at the end.) The first Phase 1 QML file was provided by Shaun Lewis of the Brecon Beacons National Park who acquired them from Natural Resources Wales. The second Phase 1 QML file was created by Anita Graser and Mike Evans. In December 2015 James Watkins of Oxford Brookes University emailed me to draw my attention to some QML style files for Phase 1 that they have made available (look under the question 'How can I add the JNCC symbology to my exports in QGIS?')

The style files implement a number of different technical approaches to styling in QGIS - the NRW one is 'rule-based' whilst Anita Graser's and those of Oxford Brookes are 'categorized'; but the technical implementation is unimportant and both work equally well. Another similarity is that neither assigns a style to every possible Phase 1 habitat code - for example all miss out some higher level codes such as 'A1' and 'A1.1' - assuming that habitats (woodland in the case of these two) will be classified with greater precision (e.g. A1.1.1 or A1.1.2). And the NRW file, for example, only codes open water at the higher levels. So if you want to use these QML files for your own purposes, then you may have to build on them.

The differences and limitations of each of these style files are evident from the slide show below and will reflect the purposes for which they were designed. For example the codes included in the NRW style file probably reflect the particular way that Phase 1 was applied for the Phase 1 habitat survey of Wales.


  • Anita Graser's and Mike Evans' Phase 1 styles for QGIS.


  • NRW's Phase 1 styles for QGIS.


  • Oxford Brooke's Phase 1 styles for QGIS.


  • An image of original Phase 1 for Rushmere Park from the Phase 1 manual.


  • Rushmere Park with Anita Glaser's Phase 1 styles for QGIS.


  • Rushmere Park with NRW's Phase 1 styles for QGIS.


  • Rushmere Park with Oxford Brooke's Phase 1 styles for QGIS.

There is a link at the foot of the page to download a zip file containing these QML files. It also contains another couple from Oxford Brookes - one encoding some Phase 1 styles for line geometry and one for target notes. In my slightly modified versions of all of these Phase 1 QML files, I have specified that an attribute called 'p1code' holds the Phase 1 codes for each polygon. So if you want to use them 'straight out the box' you will need to make sure that your Phase 1 shapefile reflects this. If not, then for those implemented as categorical styles, you can simply change to the relevant attribute on the styles dialog; whilst for the rule-based one, you can manually edit the QML file to match what you've used.
I couldn't find any QML files that encoded styles for the National Vegetation Classification (NVC), but I was shown an NVC styling guide for GIS from Ben Averis and I created a QML file based on that (as illustrated below).
NVC QML file after guidelines from Ben Averis
This file is also included in the download file at the foot of this article. Ben's schema brigades NVC codes into related groups (as shown in the QGIS legend above) and to make this easy to use in QGIS, I abbreviated each of these groups (as seen in the labels in the map image); so, for example, Ben's 'Fen-dominated communites' gets the abbreviation 'FDC'. These abbreviations must be recorded in an attribute in your shapefile in order to use the QML file I have created. The QML file expects this attribute to be called 'stylecode'. Of course you should also have another shapefile attribute with the full NVC code so that you can label individual polygons with their codes.
If you come across, or develop, any more style resources for working with habitats in QGIS, please let me know and I will add links in here.

Comments

Hi Rich, these styles are really useful, thanks for providing them. I am having a bit of trouble getting my polygons to follow the style for Phase 1 habitats, because my attribute is labelled differently to yours. I don't want to rename my shapefile attributes, so please can you tell me how can I rename the attribute in the style file? Thanks, Dan.

Hi, Please can you provide some further guidance re how to upload these files into QGIS. Not sure if the security we have in place at work is stopping me viewing these, however, i can't seem to upload to start drawing the phase 1 vectors. Do i just download to my C drive and access via the browser or do i upload via plugins. Thanks Simon

As above from psybreeze - how do I get the QML's into QGIS. I have followed guidance from multiple sources, but am not able to apply the styles into QGIS 2.18 Las Palmas - can you help? Cheers Dom