Expression Based.. Styling

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Expression Based.. Styling

Régis Haubourg
Hi all,
I searched a while without any result.
Did anyone ever asked for expression based styling ?
Nathan's expression evaluator instead of fields list in  category, graduated  and ruled based styling would be brilliant.
 Mapinfo does it and I use it a lot.
Anyone interested? Anyone already on it maybe?

Régis
Reply | Threaded
Open this post in threaded view
|

Re: Expression Based.. Styling

Andreas Neumann-4
Hi Régis,

Can you please elaborate how this relates to the rule-based rendering we
already have in QGIS?

Thank you for describing the difference!

Andreas

Am 06.07.2012 17:43, schrieb haubourg:

> Hi all,
> I searched a while without any result.
> Did anyone ever asked for expression based styling ?
> Nathan's expression evaluator instead of fields list in  category, graduated
> and ruled based styling would be brilliant.
>  Mapinfo does it and I use it a lot.
> Anyone interested? Anyone already on it maybe?
>
> Régis
>
>
> --
> View this message in context: http://osgeo-org.1560.n6.nabble.com/Expression-Based-Styling-tp4986594.html
> Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
> _______________________________________________
> Qgis-developer mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>


_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Expression Based.. Styling

Régis Haubourg
Hi Andreas,
maybe I missed something, please tell me.

This is how I see the matter:
Rule based styling allows to create rules based on existing fields with SQL queries, but, Refine assistants only have access to existing fields. Once refined rules on single or multiple fields are created, you then have the possibility to use expression evaluator to modify each rule, reorder, one after each other. This is awesome for many use cases, but not for thoses ones :

 Example 1:classify and normalize numeric data  You want to apply a sqrt function on a numeric field and classify it with graduate value. Having the expression builder accessible instead of fields list allows it directly.  Mapinfo allows you to classify a expression (sqrt(myfield)/max(myfield) * 100 for example).  Doing it in QGIS requires to create a new field. So the user need to have rights on it or duplicate it. I don't like that users duplicate data, since I am data administrator. Modifying data for representation purposes is bad too.


Example 2: Calculate advanced rotation and size fields : I have waste water plants to map. I want them red symbols for dysfunctionning plants and green for the others. I want a point size varying based on size (~number of inhabitants). If I want a correct representation, I want point size to vary between 40 mm on screen and 0.1. With an expression instead of existing fields, this can be easy. I do know how to do that in postgis or spatiallite view by myself. Common users don't
This would be even easier with a dedicated gui to help user choose an d preview Sqrt, exp , or Ln dynamic.

Example 3: generate unique values for legend labelsI need to categorize data on a field, but with a display order (40 classes). I have a code for classe number, and a label field.  In QGIS, I have two choices: Classify on code and manually change labels (long and painful), or classify on label field with ruled based labeling, and then order classes with priority order. Long and painful too. With an expression, I could evaluate "code" || ' - ' || "label" , and have it sorted and readable directly. Not perfect, but fast. This is what we need when having a meeting with authorities and only 3 hours to prepare a draft map.

Did I miss something? I think QGIS still need some work to achieve all cartographic representation rules (http://www.scribd.com/doc/33408233/SUG243-Cartography-Proportional-Symbol)

Are you interested if my organisation supports such a functionnality?
Reply | Threaded
Open this post in threaded view
|

Re: Expression Based.. Styling

Nathan Woodrow
Hey Régis,

I think that would a good feature to add. It would add a lot of power
to the rendering engines, including the rule based render. +1 from me
for adding support for this if we can.

- Nathan

On Mon, Jul 9, 2012 at 6:18 PM, haubourg
<[hidden email]> wrote:

> Hi Andreas,
> maybe I missed something, please tell me.
>
> This is how I see the matter:
> Rule based styling allows to create rules based on *existing* fields with
> SQL queries, but, *Refine assistants only have access to existing fields*.
> Once refined rules on single or multiple fields are created, you then have
> the possibility to use expression evaluator to modify each rule, reorder,
> one after each other. This is awesome for many use cases, but not for thoses
> ones :
>
> * Example 1:classify and normalize numeric data*  You want to apply a sqrt
> function on a numeric field and classify it with graduate value. Having the
> expression builder accessible instead of fields list allows it directly.
> Mapinfo allows you to classify a expression (sqrt(myfield)/max(myfield) *
> 100 for example).  *Doing it in QGIS requires to create a new field. So the
> user need to have rights on it or duplicate it.* I don't like that users
> duplicate data, since I am data administrator. Modifying data for
> representation purposes is bad too.
>
>
> *Example 2: Calculate advanced rotation and size fields : *I have waste
> water plants to map. I want them red symbols for dysfunctionning plants and
> green for the others. I want a point size varying based on size (~number of
> inhabitants). If I want a correct representation, I want point size to vary
> between 40 mm on screen and 0.1. With an expression instead of existing
> fields, this can be easy. *I do know how to do that in postgis or
> spatiallite view by myself. Common users don't *
> This would be even easier with a dedicated gui to help user choose an d
> preview Sqrt, exp , or Ln dynamic.
>
> *Example 3: generate unique values for legend labels*I need to categorize
> data on a field, but with a display order (40 classes). I have a code for
> classe number, and a label field.  In QGIS, I have two choices: Classify on
> code and manually change labels (long and painful), or classify on label
> field with ruled based labeling, and then order classes with priority order.
> Long and painful too. With an expression, I could evaluate "code" || ' - '
> || "label" , and have it sorted and readable directly. Not perfect, but
> fast. *This is what we need when having a meeting with authorities and only
> 3 hours to prepare a draft map. *
>
> Did I miss something? I think QGIS still need some work to achieve all
> cartographic representation rules (
> http://www.scribd.com/doc/33408233/SUG243-Cartography-Proportional-Symbol
> http://www.scribd.com/doc/33408233/SUG243-Cartography-Proportional-Symbol )
>
> Are you interested if my organisation supports such a functionnality?
>
>
> --
> View this message in context: http://osgeo-org.1560.n6.nabble.com/Expression-Based-Styling-tp4986594p4986858.html
> Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
> _______________________________________________
> Qgis-developer mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Expression Based.. Styling

giohappy
I agree Regis, it would add a new "dimension" to the rendering engine. 
+1 also from me.

giovanni

2012/7/9 Nathan Woodrow <[hidden email]>
Hey Régis,

I think that would a good feature to add. It would add a lot of power
to the rendering engines, including the rule based render. +1 from me
for adding support for this if we can.

- Nathan

On Mon, Jul 9, 2012 at 6:18 PM, haubourg
<[hidden email]> wrote:
> Hi Andreas,
> maybe I missed something, please tell me.
>
> This is how I see the matter:
> Rule based styling allows to create rules based on *existing* fields with
> SQL queries, but, *Refine assistants only have access to existing fields*.
> Once refined rules on single or multiple fields are created, you then have
> the possibility to use expression evaluator to modify each rule, reorder,
> one after each other. This is awesome for many use cases, but not for thoses
> ones :
>
> * Example 1:classify and normalize numeric data*  You want to apply a sqrt
> function on a numeric field and classify it with graduate value. Having the
> expression builder accessible instead of fields list allows it directly.
> Mapinfo allows you to classify a expression (sqrt(myfield)/max(myfield) *
> 100 for example).  *Doing it in QGIS requires to create a new field. So the
> user need to have rights on it or duplicate it.* I don't like that users
> duplicate data, since I am data administrator. Modifying data for
> representation purposes is bad too.
>
>
> *Example 2: Calculate advanced rotation and size fields : *I have waste
> water plants to map. I want them red symbols for dysfunctionning plants and
> green for the others. I want a point size varying based on size (~number of
> inhabitants). If I want a correct representation, I want point size to vary
> between 40 mm on screen and 0.1. With an expression instead of existing
> fields, this can be easy. *I do know how to do that in postgis or
> spatiallite view by myself. Common users don't *
> This would be even easier with a dedicated gui to help user choose an d
> preview Sqrt, exp , or Ln dynamic.
>
> *Example 3: generate unique values for legend labels*I need to categorize
> data on a field, but with a display order (40 classes). I have a code for
> classe number, and a label field.  In QGIS, I have two choices: Classify on
> code and manually change labels (long and painful), or classify on label
> field with ruled based labeling, and then order classes with priority order.
> Long and painful too. With an expression, I could evaluate "code" || ' - '
> || "label" , and have it sorted and readable directly. Not perfect, but
> fast. *This is what we need when having a meeting with authorities and only
> 3 hours to prepare a draft map. *
>
> Did I miss something? I think QGIS still need some work to achieve all
> cartographic representation rules (
> http://www.scribd.com/doc/33408233/SUG243-Cartography-Proportional-Symbol
> http://www.scribd.com/doc/33408233/SUG243-Cartography-Proportional-Symbol )
>
> Are you interested if my organisation supports such a functionnality?
>
>
> --
> View this message in context: http://osgeo-org.1560.n6.nabble.com/Expression-Based-Styling-tp4986594p4986858.html
> Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
> _______________________________________________
> Qgis-developer mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer


_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Expression Based.. Styling

Nathan Woodrow
In reply to this post by Régis Haubourg
Hey Régis,

Just wondering if you ever made any progress in this, or are still interested.  I was thinking about this the other day and remembered you brought it up a while ago.

I was thinking about having a look at what would be required to do something like this.

Regards,
Nathan


On Sat, Jul 7, 2012 at 1:43 AM, haubourg <[hidden email]> wrote:
Hi all,
I searched a while without any result.
Did anyone ever asked for expression based styling ?
Nathan's expression evaluator instead of fields list in  category, graduated
and ruled based styling would be brilliant.
 Mapinfo does it and I use it a lot.
Anyone interested? Anyone already on it maybe?

Régis


--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Expression-Based-Styling-tp4986594.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer


_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Expression Based.. Styling

Régis Haubourg
Hi Nathan,
well, I postponed fundings for this to 2013 because of all discussions about 2.0 and feature freeze in december. I was stuck with QGIS 1.8 deployment with profile problems (--configpath KO with plugin install, and symbolic links to cheat it in Windows Server.. really sucks!). I focused then on urgencies like performances on shape (network only), crashes of composer...

I'm still extremely interested, and this could allow us to go to very nice interfaces for bivariate analysis (size + colour + choice of regression type sqrt, ln, linear.. )

If your still interested, and if PSC member agree that it's OK working on new features for 2.1.. I 'm ready to help for user specifications and maybe fundings (better to discuss it on private mails).
Régis
Reply | Threaded
Open this post in threaded view
|

Re: Expression Based.. Styling

Nathan Woodrow
Hey Régis,

I'm not sure we will still be having a feature freeze in December there is still a bit to do, and personally I can't see us hitting a release target of the start of next year. 

I'm quite keen to having something this in QGIS so I'm happy to work on for 2.0 if no one objects.

- Nathan


On Sun, Nov 25, 2012 at 4:24 AM, haubourg <[hidden email]> wrote:
Hi Nathan,
well, I postponed fundings for this to 2013 because of all discussions about
2.0 and feature freeze in december. I was stuck with QGIS 1.8 deployment
with profile problems (--configpath KO with plugin install, and symbolic
links to cheat it in Windows Server.. really sucks!). I focused then on
urgencies like performances on shape (network only), crashes of composer...

I'm still extremely interested, and this could allow us to go to very nice
interfaces for bivariate analysis (size + colour + choice of regression type
sqrt, ln, linear.. )

If your still interested, and if PSC member agree that it's OK working on
new features for 2.1.. I 'm ready to help for user specifications and maybe
fundings (better to discuss it on private mails).
Régis



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Expression-Based-Styling-tp4986594p5018553.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer


_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer