QGIS Gets group layer definitions

You may have guessed,  I’m a little OCD. Things needs to be ordered and structured, yes, I wash my hands twice to make sure I get all the bateria. What has this got to do with QGIS? Well, since I’ve started using QGIS I’ve been frustrated, I create all these really cool layers then every time I create a new map for a client, I have to drag them all in one by one, of course I could save the map and open that map each time but what happens when I only need the environment data from it or the aviation data? Am I supposed to have maps set up for each data type that I use?

So, I had a chat with QGIS superstar Nathan Woodrow & he reminded me of his idea a while back called “QLR” – QGIS Layer Reference, whereby you can group data & then save the style of the GROUP. After a bit of a chat, he agreed to update the QLR for the QGIS Nightly Build (2.7 51bb803), making it available to everyone.

Using QLR files, for me, is a gift from above, it means that for my wind farm analysis I can prestyle all the environment data, archaeological data, aviation data etc as seperate groups which I can drag into maps as and when I need them, rather than bringing in seperate layer files for each data.

Here is a demonstration of the QLR in practice:

Add the environment data to QGIS (already styled)

Step1: Bring in data
Step1: Bring in data

Next group the data and in this case I will call it “biological environment”

Step2: Group the data and rename
Step2: Group the data and rename

Look closely, you will see a new option in the menu, “Save as Layer Definition File”

Step3: Save as QLR
Step3: Save as QLR

So now the “biological environment” style is saved, next time I use QGIS, I can just drag this group in and it will all be prestyled and ready to use. Add the QLR by either going to the “Layer” tab and selecting “Add Layer Definition File” or drag and drop.

Step4: Add the QLR
Step4: Add the QLR

Voila both groups load and style perfectly.

See that the groups draw perfectly prestyled
See that the groups draw perfectly prestyled

The new QLR feature is available in the QGIS nightly build. Give it a go.

Nick D

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s