[Qgis-developer] Symbology api

Chris Crook ccrook at linz.govt.nz
Fri Oct 3 10:39:18 PDT 2014


Interesting idea.

At the moment the graduated renderer colour is also a discrete function of attributes.  Changing to a continuous function (or having a continuous function alternative) would mean changing the legend interface somewhat.

I've been thinking about how to better implement the Vector Field Renderer plugin (written before expression based renderering, uses a python renderer) and I'm thinking that it only needs a few more expression based properties in the symbology to be able to replace the python rendering (independent x,y scaling and offset of symbols, and an x,y offset or more simply just an affine transformation maybe).  Also (if it is not already present) some functions for determining map scale in expressions.

Cheers
Chris

________________________________________
From: Vincent Mora [vincent.mora at oslandia.com]
Sent: 04 October 2014 00:10
To: qgis-dev
Subject: [Qgis-developer] Symbology api

Hi all,

While thinking about the interface of categorized and graduated
symbology with varying size (instead of color) I had an idea to reduce
the code complexity in src/core/symbology-ng (~15% less code).

Since it changes the symbology API, I'd like your input on that:

At the moment we deal with categorized, graduated, rule-based and single
symbol with different classes.

At the same time the single symbol allows to use expressions for all
symbol properties.

We can use expressions to make the single symbol layer behave:
- graduated : properties are continuous functions of attributes,
- categorized or rule based : properties are discrete function of
attributes

The user interfaces for categorized, graduated, rule-based could remain
the same, it's just that it would generate the expressions for the
single symbol instead of configuring as specific class. Several
categories could be defined to affect various parameters (color and size
are the first use case).

Can you tell me if the idea is sound ?

V.



PS: (implementation detail)

Data defined properties are treated as a special case in the symbology
classes.

Since a constant is a valid expression, why not avoid this special
treatment and have properties being always expressions in the symbology
classes ?


This message contains information, which may be in confidence and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info at linz.govt.nz) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank You.


More information about the Qgis-developer mailing list