2

I have one shapefile containing parts of hidrographic basins on the brazilian state of Espírito Santo. I want to generate a classification style/label based on two attributes:

1st: The percentage of forest on the landscape of each basin. The data should be divided between 0 - 10% and 10-50% landscape coverage (there's no more than 50% coverage on this shapefile)

2nd: The Patch Connectivity index generated from my analysis, ranked in crescent order.

Basically, the shape should be divided based on the percentage of forestation and each class would recieve a different color gradient, that would rank the PC index. From what I know about QGIS, this should be done using a rule based styling. I tried it using the percentage of forest as my first classifier and then adding categories to it. Here's what I came up with (let's try to overcome the language barrier here):

My rule based style (FAIL)

Problem is, after I apply these settings, the shapefile appear as if it's only being classified using the percentage of landcape.

How it shows up

I have tried deactivating the plain color label, but the whole shapefile disappears. If I change the style of the 1st level label to a translucid one, there's nothing beneath. I also tried changing the symbol levels (the order they're drawn) and nothing happened. Any thoughts on how to solve this?

  • Can you share the dataset? It would make it easier to show how the desired effect can be achieved. – underdark Nov 12 '17 at 16:55
  • Sure thing. I've made it available here: we.tl/MExvLzCwSO Thank you for your time! – Eric Lino Nov 12 '17 at 20:37
6

The rules can be simplified a lot: By nesting the rules, you can get rid of all the IF statements:

enter image description here

The second important thing is to deactivate the symbols on the top-level rules. If these symbols are not deactivated, they are drawn every time the rule is true. That's why you saw only two colors in your solution.

enter image description here

  • I get it now. I'll try and apply it here, thank you for the input. However, I noticed that 3 of the basins (the top two and the fourth, if you count from top to bottom) are still with the same color. I believe that has happened because of the PC limits that you wrote on your rules (i see you're using the same PC values on both rules). Is it possible to apply different values for each? – Eric Lino Nov 12 '17 at 22:34
  • Sure, these are just the default classifications which were picked automatically. You can change them. – underdark Nov 12 '17 at 22:46

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.