3

For many of my datasets I have the same imported data duplicated numerous times, each iteration displaying the data values for a different column (in my case it's fish catch weight per gridded cell per year, so lots of iterations of the same grid, with a different pattern of values per year).

For presentation purposes, it strikes me as helpful to use the same scale for each year, so I go to the original data and divide the maximum value into (arbitrarily) 10 classes and manually input the values and labels after setting the desired colour ramp and input data field: like this

This is extremely tedious, not just the manual excel calculation part, but also the input interface for the values & labels*, hence my intention to make use of the 'save style' option. HOWEVER: when I save the style as QML and load it for the next layer, it saves everything - including the data field (in my case, year). When I change this field, QGis automatically generates the values & labels based on the data for that field, ditching all of the values & labels I set.

  1. Is there any way to avoid this happening & thereby duplicate class number, values and labels for each field by simply loading a style?

  2. (somewhat meta) Am I going around this the wrong way, OR, is there a different face I could use to climb this mountain?

2

The fastest solution - although a bit hackish - is to create a QML style file, open it in text editor, and change the attribute name to the desired one. You can just create copies of the style for each column you need to use.

  • Sorry for not seeing this earlier - impressive dedication answering on xmas eve!! For anyone else doing this (or me later): QML files open in Excel, and you want to edit the item on the third line, in my case here: renderer-v2 attr="Year_ 1996" – dez93_2000 Jan 19 '14 at 11:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.