[Qgis-developer] Legend for proportionnal symbols and expression based symbols
regis.haubourg at eau-adour-garonne.fr
Wed Dec 4 03:08:05 PST 2013
we have a long lasting problem with proportionnal legends in QGIS. It gets
more problematic with V2, as those maps are so beautiful and popular.
I'm starting some brainstorming to clarify fonctionnal specifications what
we actually want to have legends in layers registry and composer working.
Here are some exemples of what I would love to see in legends:
-  proportionnal circles or square with 1 to 5 classes
-  proportionnal symbols AND colors
Now that we have expressions everywhere, we probably will have to handle
legends differently than in other GIS, where legend is generated once, when
user tune symbology. Let me explain:
- user can now define expressions for size, color, rotation, border width...
for any sub-marker (1 to n) of a symbol.
- Moreover, we can use conditionnal expressions, and scale dependent
conditions ($scale variable).
- QGIS is also a server, we need to be able to generate legends working on
really displayed datas.
Conclusion, It now is impossible to correctly pre-generate the legend by
analysing symbology properties.
Does this sound possible to developpers to explore some other way? We could
read real dataset to collect informations to build a legend, and eventually
do some statistical classification to get discrete classes from continuous
We could do that on live or on-demand update maybe.
My idea was to collect rendered object in current canvas and current scale.
BUT.. we can face discrete data - some kind of SELECT DISTINCT can do the
trick - , OR continuous data - we need then to do some statistical
classification to reduce the legend to 1 - 10 classes to get it readable.
We also need some intelligence in those statistical classifications:
- round values to keep it readable
- display separate classes only if size or color distance is long enough so
that human eye sees some difference on screen. ie: do not display for
classes if symbol size varies from 0.5 to 0.7...
- add some options in GUI to choose number of classes, type of legend
- keep the classification process fast (subset of data with random
- test all use cases, I'm mostly thinking of points symbols, but lines and
polygons must not be forgotten.
I'm sure plenty of scientists have already been theorizing all this. Any
opinions? Could this be an idea for GSoC or other kind of training course?
I'll be pleased to get feedback from the community.
View this message in context: http://osgeo-org.1560.x6.nabble.com/Legend-for-proportionnal-symbols-and-expression-based-symbols-tp5092635.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
More information about the Qgis-developer