Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Rule-Based symbology #2

Open
KoZwo opened this issue Jul 7, 2020 · 1 comment
Open

Enable Rule-Based symbology #2

KoZwo opened this issue Jul 7, 2020 · 1 comment

Comments

@KoZwo
Copy link

KoZwo commented Jul 7, 2020

Hi, I'm in a wierd situation where the symbology of my layer is in Rule-based and I can't change this for specific reasons.

I see that your tool can't extract HEX values because of that. Would it be possible to make it work with this type of symbology ?

Thanks alot!

@kxtells
Copy link
Owner

kxtells commented Jul 8, 2020

Hi @KoZwo,

Yes, I guess that if Qgis can render it, the plugin could to render it too, retrieving a symbol and a color.
It was never implemented since on the original version of this plugin the API was a bit confusing for me (2012!), and I did not really need it :-D

It is a matter of getting into the classQgsRuleBasedRenderer documentation and come up with a new function in https://github.com/kxtells/kxtells_qgis_plugins/blob/master/color_attribute/color_attribute.py#L417

I created a new branch implementing a first approach to this, note that with rule-based you can also end up with a feature matching various rules, in that case I guess the best approach is to simply retrieve the 1st symbol (this is what's implemented in the branch)

Please, test it cloning from here: https://github.com/kxtells/kxtells_qgis_plugins/tree/feat-%232-rule-based-symbols see if it works for your case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants