Re: [Qgis-developer] Data-defined buttons for en masse size and rotation
Hi Regis, Here is a PR for one element of this feature https://github.com/qgis/QGIS/pull/1853 It's only the ground work, so you have no GUI to help you setup the expression for the size rotation, but you can use scale_exp and scale_linear to define your value range and the corresponding symbol size range. It works for line width too. The legend's symbol does dissapear though, but I believe it's due to the data defined size. I'll work on the legend to have something meaningful when using size expressions. If you can recompile the branch and give feedback, it will be welcome. Thanks, V. On 21/01/2015 14:46, Régis Haubourg wrote: Hi Vincent, good to know, thanks Régis Vincent Mora wrote On 20/01/2015 22:51, Anita Graser wrote: Hi Régis, Thanks a lot for all the details! On Mon, Jan 19, 2015 at 9:30 PM, Régis Haubourg lt; regis.haubourg@ gt; wrote: - when using the GUI assistant or the graduated classification, we will enable a legend for mapcanvas and composer 's legend. That legend will be of this type [0] This will certainly be a nice addition. Will it work with all kinds of point markers? Or only simple markers? If my design works as expected, it should even work for lines width. [0] http://s14.postimage.org/3jr9kcmgh/muesure.png Best wishes, Anita ___ Qgis-developer mailing list Qgis-developer@.osgeo http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@.osgeo http://lists.osgeo.org/mailman/listinfo/qgis-developer -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Data-defined-buttons-for-en-masse-size-and-rotation-tp5181954p5182855.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Data-defined buttons for en masse size and rotation
On 20/01/2015 22:51, Anita Graser wrote: Hi Régis, Thanks a lot for all the details! On Mon, Jan 19, 2015 at 9:30 PM, Régis Haubourg regis.haubo...@eau-adour-garonne.fr wrote: - when using the GUI assistant or the graduated classification, we will enable a legend for mapcanvas and composer 's legend. That legend will be of this type [0] This will certainly be a nice addition. Will it work with all kinds of point markers? Or only simple markers? If my design works as expected, it should even work for lines width. [0] http://s14.postimage.org/3jr9kcmgh/muesure.png Best wishes, Anita ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Data-defined buttons for en masse size and rotation
Hi Vincent, good to know, thanks Régis Vincent Mora wrote On 20/01/2015 22:51, Anita Graser wrote: Hi Régis, Thanks a lot for all the details! On Mon, Jan 19, 2015 at 9:30 PM, Régis Haubourg lt; regis.haubourg@ gt; wrote: - when using the GUI assistant or the graduated classification, we will enable a legend for mapcanvas and composer 's legend. That legend will be of this type [0] This will certainly be a nice addition. Will it work with all kinds of point markers? Or only simple markers? If my design works as expected, it should even work for lines width. [0] http://s14.postimage.org/3jr9kcmgh/muesure.png Best wishes, Anita ___ Qgis-developer mailing list Qgis-developer@.osgeo http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@.osgeo http://lists.osgeo.org/mailman/listinfo/qgis-developer -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Data-defined-buttons-for-en-masse-size-and-rotation-tp5181954p5182855.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Data-defined buttons for en masse size and rotation
On 19/01/2015 21:04, Anita Graser wrote: Hi Vincent, On Mon, Jan 19, 2015 at 11:20 AM, Vincent Mora vincent.m...@oslandia.com wrote: The changes are illustrated in the attached files. Thanks a lot for the mockups! I don't have the Continuous size assistant right now, but it will be a dialog with a selection of the scale function (Flannery, Area, Linear) with a preview (a legend) on the side. That sounds like a good idea. You mentioned that Flannery will be the recommended function. What's your reasoning behind that? Concerning the area scale function, I'm always wondering if it assumes square or circle area. The name Continuous size assistant seems a little difficult to understand. I probably wouldn't know what to expect of such a tool without giving it a test run. Maybe the context menu entry could simply be Configure data-defined size. I'll post a mockup as soon as I get out of the ground work (adding en masse expression for size and rotation). The dialog will propose some buttons to auto-set the function parameters (minValue and maxValue) by analyzing the data. Will it be possible to select different percentiles? I don't understand what you mean by different percentiles. Can you explain it a bit to me so I can put it in :) en masse Concerning the term en masse itself, I also wonder if it's the most easily to understand term. Maybe we could be talking about the master size and master rotation but probably some native speaker could suggest a clear and simple name for this feature. I looked it up an it appears to be a french expression that is used in english. But as a french native I'm certainly not the best judge for that. A native speaker advice will be welcome. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Data-defined buttons for en masse size and rotation
Hi Régis, Thanks a lot for all the details! On Mon, Jan 19, 2015 at 9:30 PM, Régis Haubourg regis.haubo...@eau-adour-garonne.fr wrote: - use data defined widget used in labeling windows in symbology screens. This will be more consistent and was discussed previously on the list. I found some money for that, hope community still agrees You certainly have +1 from me. - add graduated classification for size, with same classification options as for current renderer. This will be possible to set both color graduated legend and size varying legend that way, with legend enabled. Great! - add a GUI assistant to help users define expressions for continuous size varying expressions. We currently have that in advanced fields, which appears to be confusing to users here. We would like to plug that assistant with label expressions widgets. I like the idea. As mentioned, I think we should strive to pick the most easily understandable name for the menu entry for this assistant. This topic needs precise mockups because it's not easy to understand interactions of datadefined tools on symbol / marker level from a UX point of view. +1 oh yes :-) - when using the GUI assistant or the graduated classification, we will enable a legend for mapcanvas and composer 's legend. That legend will be of this type [0] This will certainly be a nice addition. Will it work with all kinds of point markers? Or only simple markers? [0] http://s14.postimage.org/3jr9kcmgh/muesure.png Best wishes, Anita ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Data-defined buttons for en masse size and rotation
Hi Vincent, On Mon, Jan 19, 2015 at 11:20 AM, Vincent Mora vincent.m...@oslandia.com wrote: The changes are illustrated in the attached files. Thanks a lot for the mockups! I don't have the Continuous size assistant right now, but it will be a dialog with a selection of the scale function (Flannery, Area, Linear) with a preview (a legend) on the side. That sounds like a good idea. You mentioned that Flannery will be the recommended function. What's your reasoning behind that? Concerning the area scale function, I'm always wondering if it assumes square or circle area. The name Continuous size assistant seems a little difficult to understand. I probably wouldn't know what to expect of such a tool without giving it a test run. Maybe the context menu entry could simply be Configure data-defined size. The dialog will propose some buttons to auto-set the function parameters (minValue and maxValue) by analyzing the data. Will it be possible to select different percentiles? en masse Concerning the term en masse itself, I also wonder if it's the most easily to understand term. Maybe we could be talking about the master size and master rotation but probably some native speaker could suggest a clear and simple name for this feature. Best wishes Anita ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Data-defined buttons for en masse size and rotation
Hi Anita, I was not sure on first message of Vincent, but now I'm sure, I'm the funder of such features ;-). I did not spoil that work before, because that took us a lng time to validate the contract. We should have make it for 2.8 at start.. 2.10 will be the goal. Discussion with community is more than welcome of course! What we need is : - use data defined widget used in labeling windows in symbology screens. This will be more consistent and was discussed previously on the list. I found some money for that, hope community still agrees - add graduated classification for size, with same classification options as for current renderer. This will be possible to set both color graduated legend and size varying legend that way, with legend enabled. - add a GUI assistant to help users define expressions for continuous size varying expressions. We currently have that in advanced fields, which appears to be confusing to users here. We would like to plug that assistant with label expressions widgets. We only propose squaretail (= circle surface or exp 0.5), linear and flannery (exp 0.57) at start. If you know other interesting functions, feel free to submit. Flannery gives good results and is considered as better classification method by some cartographers. No objection to keep circle surface as default instead if you have other references. This topic needs precise mockups because it's not easy to understand interactions of datadefined tools on symbol / marker level from a UX point of view. - when using the GUI assistant or the graduated classification, we will enable a legend for mapcanvas and composer 's legend. That legend will be of this type [0] - we will also add test and documentation in english and french in qgis documentation. Please tell us how that sounds to you. Cheers, Régis [0] http://s14.postimage.org/3jr9kcmgh/muesure.png -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Data-defined-buttons-for-en-masse-size-and-rotation-tp5181954p5182425.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Data-defined buttons for en masse size and rotation
Hi all, As an attempt to Improve GUI consistency UX for data-defined style (#9881) I'm planing to add a data-defined button[1] to the en masse size and rotation changing fields [2]. This could *replace* the scaling factor, scaling method and rotation available in the 'Advanced' menu. After that a graphical assistant (accessible from the data-defined button) will be developed to help the user define the scale-function (preview the various symbol sizes). I'd like to have your impression on that change, especially on the *replace*, and comment on the plan below. Thanks, V. [1] QgsDataDefinedButton: the button already in the Label properties for data-defined properties. [2] What I call the en masse size and rotation fields are the fields Size and Rotation displayed at the Marker level for simple symbol and the popup for size in the graduated, categorized and rule-based symbologies (I plan to add rotation there too). Data defined property buttons will be added to the en masse change fields for single symbol, graduated, categorized and rule-based symbologies. This is especially useful to be able to use scaling functions to define the size of the scaled symbols: - Flannery (recommanded): scale_exp( variable, minValue, maxValue, minSize, maxSize, 0.57 ) - Area : scale_exp( variable, minValue, maxValue, minSize, maxSize, 0.5 ) - Linear : scale_linear( variable, minValue, maxValue, minSize, maxSize ) Using an expression at the en masse level will set expressions for all symbols composing the marker. The behavior will be the same as with size and rotation changing: the expression will be the one of the last symbol in the marker, others markers will be scaled/rotated relative to the last marker. For the size, if the scalling method is area, the scale factor will be put inside the sqrt(). If size/rotation are defined by expressions/fields, those definitions will be lost. Definition: en masse expression pattern: - Size with scale method Area - `sqrt( expression )` for the last symbol of the marker - `sqrt( symbolSize/lastSymbolOfTheMarkerSize * expression )` for other symbols - Size with scale method Linear - `expression` for the last symbol of the marker - `(symbolSize/lastSymbolOfTheMarkerSize) * expression` for other symbols - Rotation - `expression` for the last symbol of the marker, - `expression + (symbolRotation - lastSymbolOfTheMarkerRotation)` for other symbols Disabling en masse will disable all size/rotation expressions for markers composing the symbol if they match the en masse expressions pattern. Note that the data-defined expression at this en masse level will only be set (yellow highlight) if the size/scale expression of all the symbols composing the marker match the en masse expression pattern. To avoid functionality duplication the scale and rotation could be removed from the 'Advanced menu'. This will simplify the symbology classes. To ensure backward compatibilities of old project files, the following scaling/rotation expression can be defined using old scale/rotation parameters to ensure the same rendered map: - For size - newSymbolSizeExpression = sqrt( oldScaleExpression * oldSymbolSizeOrSizeExpression ) or - newSymbolSizeExpression = oldScaleExpression * oldSymbolSizeOrSizeExpression - For rotation: - newSymbolRotationExpression = oldRotationExpression + oldSymbolRotationOrRotationExpression As a result, if expressions are used for the symbol size/rotation in addition to scalling/rotation of the marker, the replaced expressions (with scale/rotation included) may not match the en masse expression pattern and the data defined button will not be highlighted. This seems to be a minor and rare inconvenience since it will happen for project with scaled/rotated markers composed of multiple symbols with different data-defined size/rotation. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Data-defined buttons for en masse size and rotation
Dear Vincent, Thank you for your thoughts and the detailed explanation! Maybe its just me, but I'm having a hard time imagining everything described without seeing some UI mockups. Would it be possible to show dialog examples of what you are planning? Best wishes, Anita On Fri, Jan 16, 2015 at 6:29 PM, Vincent Mora vincent.m...@oslandia.com wrote: Hi all, As an attempt to Improve GUI consistency UX for data-defined style (#9881) I'm planing to add a data-defined button[1] to the en masse size and rotation changing fields [2]. This could *replace* the scaling factor, scaling method and rotation available in the 'Advanced' menu. After that a graphical assistant (accessible from the data-defined button) will be developed to help the user define the scale-function (preview the various symbol sizes). I'd like to have your impression on that change, especially on the *replace*, and comment on the plan below. Thanks, V. [1] QgsDataDefinedButton: the button already in the Label properties for data-defined properties. [2] What I call the en masse size and rotation fields are the fields Size and Rotation displayed at the Marker level for simple symbol and the popup for size in the graduated, categorized and rule-based symbologies (I plan to add rotation there too). Data defined property buttons will be added to the en masse change fields for single symbol, graduated, categorized and rule-based symbologies. This is especially useful to be able to use scaling functions to define the size of the scaled symbols: - Flannery (recommanded): scale_exp( variable, minValue, maxValue, minSize, maxSize, 0.57 ) - Area : scale_exp( variable, minValue, maxValue, minSize, maxSize, 0.5 ) - Linear : scale_linear( variable, minValue, maxValue, minSize, maxSize ) Using an expression at the en masse level will set expressions for all symbols composing the marker. The behavior will be the same as with size and rotation changing: the expression will be the one of the last symbol in the marker, others markers will be scaled/rotated relative to the last marker. For the size, if the scalling method is area, the scale factor will be put inside the sqrt(). If size/rotation are defined by expressions/fields, those definitions will be lost. Definition: en masse expression pattern: - Size with scale method Area - `sqrt( expression )` for the last symbol of the marker - `sqrt( symbolSize/lastSymbolOfTheMarkerSize * expression )` for other symbols - Size with scale method Linear - `expression` for the last symbol of the marker - `(symbolSize/lastSymbolOfTheMarkerSize) * expression` for other symbols - Rotation - `expression` for the last symbol of the marker, - `expression + (symbolRotation - lastSymbolOfTheMarkerRotation)` for other symbols Disabling en masse will disable all size/rotation expressions for markers composing the symbol if they match the en masse expressions pattern. Note that the data-defined expression at this en masse level will only be set (yellow highlight) if the size/scale expression of all the symbols composing the marker match the en masse expression pattern. To avoid functionality duplication the scale and rotation could be removed from the 'Advanced menu'. This will simplify the symbology classes. To ensure backward compatibilities of old project files, the following scaling/rotation expression can be defined using old scale/rotation parameters to ensure the same rendered map: - For size - newSymbolSizeExpression = sqrt( oldScaleExpression * oldSymbolSizeOrSizeExpression ) or - newSymbolSizeExpression = oldScaleExpression * oldSymbolSizeOrSizeExpression - For rotation: - newSymbolRotationExpression = oldRotationExpression + oldSymbolRotationOrRotationExpression As a result, if expressions are used for the symbol size/rotation in addition to scalling/rotation of the marker, the replaced expressions (with scale/rotation included) may not match the en masse expression pattern and the data defined button will not be highlighted. This seems to be a minor and rare inconvenience since it will happen for project with scaled/rotated markers composed of multiple symbols with different data-defined size/rotation. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer