Feature request #4378

Allow categorized symbology with (up to) 3 fields

Added by Giovanni Manghi over 12 years ago. Updated over 10 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Symbology
Pull Request or Patch supplied:No Resolution:fixed
Easy fix?:No Copied to github as #:14310

Description

Imagine to have two attributes ATT1 and ATT2, with the following values

ATT1 | ATT2
A | C
B | D

then making the categorized symbology with these two fields would result in the following symbology classes/categories

A-C
A-D
B-C
B-D

History

#1 Updated by Martin Dobias over 12 years ago

  • Assignee deleted (Martin Dobias)

Maybe using field calculator would be a better solution rather than adding such functionality directly to categorized symbol renderer? The GUI might get bloated quickly.

#2 Updated by Giovanni Manghi over 12 years ago

Martin Dobias wrote:

Maybe using field calculator would be a better solution rather than adding such functionality directly to categorized symbol renderer? The GUI might get bloated quickly.

so, the suggestion would be to add a function to calculate a new field with all the possible permutations between two or more fields and then use it to style the layer... sounds nice to me!

In any case this was just a suggestion from a Arc* user.

#3 Updated by Martin Dobias over 12 years ago

What about just doing a concatenation of ATT1 with ATT2 in a new field and then using categorized symbol renderer on this new field? This should effectively include all existing permutations of those two fields.

#4 Updated by Giovanni Manghi over 12 years ago

Martin Dobias wrote:

What about just doing a concatenation of ATT1 with ATT2 in a new field and then using categorized symbol renderer on this new field? This should effectively include all existing permutations of those two fields.

Hi Martin.

I have doubts now. Concatenating fields it is already possible with the field calculator, like

tostring ( ATT1 )||tostring ( ATT2 )

is this what you mean?

The "problem" is that using two or more fields and making possible permutations of the values, then the permutations number can be very well > then the number of the records in the table of attribute.

If the field calculator way then cannot be used, I suggest a solution to help don't make the symbology GUI too bloated:

on the side of the "column" dropdown in the categorized symbology panel, add a "+" button, exactly as you can see here in Redmine (if you are admin) to allow add categories, versions, etc.

If the user click on this icon, then under the first "column" dropdown, show a second one, and if clicked again a third one (I guess three fields is more than enough).

#5 Updated by Giovanni Manghi over 12 years ago

  • Target version set to Version 1.7.4

#6 Updated by Giovanni Manghi about 12 years ago

  • Target version changed from Version 1.7.4 to Version 2.0.0

#7 Updated by Eduardo Gonzalez almost 12 years ago

Hi Giovanni,

The "problem" is that using two or more fields and making possible permutations of the values, then the permutations number can be very well > then the number of the records in the table of attribute.

I don't quite see how this would be true... I think that the number unique registers resulting from concatenating using the field calculator would be the correct ammount of permutations... Thus, the tool/functionality you suggest would just be a shortcut to this concatenating function and perhaps skipping the necessity of a new field in the attributes table. Am I missing something?

#8 Updated by Giovanni Manghi almost 12 years ago

I don't quite see how this would be true... I think that the number unique registers resulting from concatenating using the field calculator would be the correct ammount of permutations... Thus, the tool/functionality you suggest would just be a shortcut to this concatenating function and perhaps skipping the necessity of a new field in the attributes table. Am I missing something?

I think you are right.

#9 Updated by Pirmin Kalberer over 11 years ago

  • Target version changed from Version 2.0.0 to Future Release - Nice to have

#10 Updated by Giovanni Manghi over 10 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

This feature is now available in qgis master.

Also available in: Atom PDF